TElectronComponentMapper.xml 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="com.cirs.biz.mapper.TElectronComponentMapper">
  6. <resultMap type="TElectronComponent" id="TElectronComponentResult">
  7. <result property="id" column="id" />
  8. <result property="componentName" column="component_name" />
  9. <result property="manufacturer" column="manufacturer" />
  10. <result property="componentModel" column="component_model" />
  11. <result property="replaceDomesticModel" column="replace_domestic_model" />
  12. <result property="qualityGrade" column="quality_grade" />
  13. <result property="deliveryCycle" column="delivery_cycle" />
  14. <result property="supplyQuantity" column="supply_quantity" />
  15. <result property="unitPrice" column="unit_price" />
  16. <result property="zzkkLevel" column="zzkk_level" />
  17. <result property="inPreference" column="in_preference" />
  18. <result property="shutdownDate" column="shutdown_date" />
  19. <result property="encapsulationMode" column="encapsulation_mode" />
  20. <result property="paramIfm" column="param_ifm" />
  21. <result property="paramVrrm" column="param_vrrm" />
  22. <result property="paramIfsm" column="param_ifsm" />
  23. <result property="paramZz" column="param_zz" />
  24. <result property="paramPcm" column="param_pcm" />
  25. <result property="paramIcm" column="param_icm" />
  26. <result property="paramVcbo" column="param_vcbo" />
  27. <result property="paramVceo" column="param_vceo" />
  28. <result property="paramVebo" column="param_vebo" />
  29. <result property="paramVdss" column="param_vdss" />
  30. <result property="paramId" column="param_id" />
  31. <result property="paramRdsOn" column="param_RDS_on" />
  32. <result property="antistaticCapacity" column="antistatic_capacity" />
  33. <result property="radiationResistance" column="radiation_resistance" />
  34. <result property="materials" column="materials" />
  35. <result property="craft" column="craft" />
  36. <result property="weight" column="weight" />
  37. <result property="createBy" column="create_by" />
  38. <result property="createTime" column="create_time" />
  39. <result property="updateBy" column="update_by" />
  40. <result property="updateTime" column="update_time" />
  41. <result property="remark" column="remark" />
  42. </resultMap>
  43. <sql id="selectTElectronComponentVo">
  44. select id, component_name, manufacturer, component_model, replace_domestic_model, quality_grade, delivery_cycle, supply_quantity, unit_price, zzkk_level, in_preference, shutdown_date, encapsulation_mode, param_ifm, param_vrrm, param_ifsm, param_zz, param_pcm, param_icm, param_vcbo, param_vceo, param_vebo, param_vdss, param_id, param_RDS_on, antistatic_capacity, radiation_resistance, materials, craft, weight, create_by, create_time, update_by, update_time, remark from t_electron_component
  45. </sql>
  46. <select id="selectTElectronComponentList" parameterType="TElectronComponent" resultMap="TElectronComponentResult">
  47. <include refid="selectTElectronComponentVo"/>
  48. <where>
  49. <if test="componentName != null and componentName != ''"> and component_name like concat('%', #{componentName}, '%')</if>
  50. <if test="manufacturer != null and manufacturer != ''"> and manufacturer = #{manufacturer}</if>
  51. <if test="componentModel != null and componentModel != ''"> and component_model = #{componentModel}</if>
  52. <if test="replaceDomesticModel != null and replaceDomesticModel != ''"> and replace_domestic_model = #{replaceDomesticModel}</if>
  53. <if test="qualityGrade != null and qualityGrade != ''"> and quality_grade = #{qualityGrade}</if>
  54. <if test="deliveryCycle != null "> and delivery_cycle = #{deliveryCycle}</if>
  55. <if test="supplyQuantity != null "> and supply_quantity = #{supplyQuantity}</if>
  56. <if test="unitPrice != null "> and unit_price = #{unitPrice}</if>
  57. <if test="zzkkLevel != null and zzkkLevel != ''"> and zzkk_level = #{zzkkLevel}</if>
  58. <if test="inPreference != null and inPreference != ''"> and in_preference = #{inPreference}</if>
  59. <if test="shutdownDate != null "> and shutdown_date = #{shutdownDate}</if>
  60. <if test="encapsulationMode != null and encapsulationMode != ''"> and encapsulation_mode = #{encapsulationMode}</if>
  61. <if test="paramIfm != null "> and param_ifm = #{paramIfm}</if>
  62. <if test="paramVrrm != null "> and param_vrrm = #{paramVrrm}</if>
  63. <if test="paramIfsm != null "> and param_ifsm = #{paramIfsm}</if>
  64. <if test="paramZz != null "> and param_zz = #{paramZz}</if>
  65. <if test="paramPcm != null "> and param_pcm = #{paramPcm}</if>
  66. <if test="paramIcm != null "> and param_icm = #{paramIcm}</if>
  67. <if test="paramVcbo != null "> and param_vcbo = #{paramVcbo}</if>
  68. <if test="paramVceo != null "> and param_vceo = #{paramVceo}</if>
  69. <if test="paramVebo != null "> and param_vebo = #{paramVebo}</if>
  70. <if test="paramVdss != null "> and param_vdss = #{paramVdss}</if>
  71. <if test="paramId != null "> and param_id = #{paramId}</if>
  72. <if test="paramRdsOn != null "> and param_RDS_on = #{paramRdsOn}</if>
  73. <if test="antistaticCapacity != null and antistaticCapacity != ''"> and antistatic_capacity = #{antistaticCapacity}</if>
  74. <if test="radiationResistance != null and radiationResistance != ''"> and radiation_resistance = #{radiationResistance}</if>
  75. <if test="materials != null and materials != ''"> and materials = #{materials}</if>
  76. <if test="craft != null and craft != ''"> and craft = #{craft}</if>
  77. <if test="weight != null and weight != ''"> and weight = #{weight}</if>
  78. </where>
  79. </select>
  80. <select id="selectTElectronComponentById" parameterType="Long" resultMap="TElectronComponentResult">
  81. <include refid="selectTElectronComponentVo"/>
  82. where id = #{id}
  83. </select>
  84. <insert id="insertTElectronComponent" parameterType="TElectronComponent" useGeneratedKeys="true" keyProperty="id">
  85. insert into t_electron_component
  86. <trim prefix="(" suffix=")" suffixOverrides=",">
  87. <if test="componentName != null">component_name,</if>
  88. <if test="manufacturer != null">manufacturer,</if>
  89. <if test="componentModel != null">component_model,</if>
  90. <if test="replaceDomesticModel != null">replace_domestic_model,</if>
  91. <if test="qualityGrade != null">quality_grade,</if>
  92. <if test="deliveryCycle != null">delivery_cycle,</if>
  93. <if test="supplyQuantity != null">supply_quantity,</if>
  94. <if test="unitPrice != null">unit_price,</if>
  95. <if test="zzkkLevel != null">zzkk_level,</if>
  96. <if test="inPreference != null">in_preference,</if>
  97. <if test="shutdownDate != null">shutdown_date,</if>
  98. <if test="encapsulationMode != null">encapsulation_mode,</if>
  99. <if test="paramIfm != null">param_ifm,</if>
  100. <if test="paramVrrm != null">param_vrrm,</if>
  101. <if test="paramIfsm != null">param_ifsm,</if>
  102. <if test="paramZz != null">param_zz,</if>
  103. <if test="paramPcm != null">param_pcm,</if>
  104. <if test="paramIcm != null">param_icm,</if>
  105. <if test="paramVcbo != null">param_vcbo,</if>
  106. <if test="paramVceo != null">param_vceo,</if>
  107. <if test="paramVebo != null">param_vebo,</if>
  108. <if test="paramVdss != null">param_vdss,</if>
  109. <if test="paramId != null">param_id,</if>
  110. <if test="paramRdsOn != null">param_RDS_on,</if>
  111. <if test="antistaticCapacity != null">antistatic_capacity,</if>
  112. <if test="radiationResistance != null">radiation_resistance,</if>
  113. <if test="materials != null">materials,</if>
  114. <if test="craft != null">craft,</if>
  115. <if test="weight != null">weight,</if>
  116. <if test="createBy != null">create_by,</if>
  117. <if test="createTime != null">create_time,</if>
  118. <if test="updateBy != null">update_by,</if>
  119. <if test="updateTime != null">update_time,</if>
  120. <if test="remark != null">remark,</if>
  121. </trim>
  122. <trim prefix="values (" suffix=")" suffixOverrides=",">
  123. <if test="componentName != null">#{componentName},</if>
  124. <if test="manufacturer != null">#{manufacturer},</if>
  125. <if test="componentModel != null">#{componentModel},</if>
  126. <if test="replaceDomesticModel != null">#{replaceDomesticModel},</if>
  127. <if test="qualityGrade != null">#{qualityGrade},</if>
  128. <if test="deliveryCycle != null">#{deliveryCycle},</if>
  129. <if test="supplyQuantity != null">#{supplyQuantity},</if>
  130. <if test="unitPrice != null">#{unitPrice},</if>
  131. <if test="zzkkLevel != null">#{zzkkLevel},</if>
  132. <if test="inPreference != null">#{inPreference},</if>
  133. <if test="shutdownDate != null">#{shutdownDate},</if>
  134. <if test="encapsulationMode != null">#{encapsulationMode},</if>
  135. <if test="paramIfm != null">#{paramIfm},</if>
  136. <if test="paramVrrm != null">#{paramVrrm},</if>
  137. <if test="paramIfsm != null">#{paramIfsm},</if>
  138. <if test="paramZz != null">#{paramZz},</if>
  139. <if test="paramPcm != null">#{paramPcm},</if>
  140. <if test="paramIcm != null">#{paramIcm},</if>
  141. <if test="paramVcbo != null">#{paramVcbo},</if>
  142. <if test="paramVceo != null">#{paramVceo},</if>
  143. <if test="paramVebo != null">#{paramVebo},</if>
  144. <if test="paramVdss != null">#{paramVdss},</if>
  145. <if test="paramId != null">#{paramId},</if>
  146. <if test="paramRdsOn != null">#{paramRdsOn},</if>
  147. <if test="antistaticCapacity != null">#{antistaticCapacity},</if>
  148. <if test="radiationResistance != null">#{radiationResistance},</if>
  149. <if test="materials != null">#{materials},</if>
  150. <if test="craft != null">#{craft},</if>
  151. <if test="weight != null">#{weight},</if>
  152. <if test="createBy != null">#{createBy},</if>
  153. <if test="createTime != null">#{createTime},</if>
  154. <if test="updateBy != null">#{updateBy},</if>
  155. <if test="updateTime != null">#{updateTime},</if>
  156. <if test="remark != null">#{remark},</if>
  157. </trim>
  158. </insert>
  159. <update id="updateTElectronComponent" parameterType="TElectronComponent">
  160. update t_electron_component
  161. <trim prefix="SET" suffixOverrides=",">
  162. <if test="componentName != null">component_name = #{componentName},</if>
  163. <if test="manufacturer != null">manufacturer = #{manufacturer},</if>
  164. <if test="componentModel != null">component_model = #{componentModel},</if>
  165. <if test="replaceDomesticModel != null">replace_domestic_model = #{replaceDomesticModel},</if>
  166. <if test="qualityGrade != null">quality_grade = #{qualityGrade},</if>
  167. <if test="deliveryCycle != null">delivery_cycle = #{deliveryCycle},</if>
  168. <if test="supplyQuantity != null">supply_quantity = #{supplyQuantity},</if>
  169. <if test="unitPrice != null">unit_price = #{unitPrice},</if>
  170. <if test="zzkkLevel != null">zzkk_level = #{zzkkLevel},</if>
  171. <if test="inPreference != null">in_preference = #{inPreference},</if>
  172. <if test="shutdownDate != null">shutdown_date = #{shutdownDate},</if>
  173. <if test="encapsulationMode != null">encapsulation_mode = #{encapsulationMode},</if>
  174. <if test="paramIfm != null">param_ifm = #{paramIfm},</if>
  175. <if test="paramVrrm != null">param_vrrm = #{paramVrrm},</if>
  176. <if test="paramIfsm != null">param_ifsm = #{paramIfsm},</if>
  177. <if test="paramZz != null">param_zz = #{paramZz},</if>
  178. <if test="paramPcm != null">param_pcm = #{paramPcm},</if>
  179. <if test="paramIcm != null">param_icm = #{paramIcm},</if>
  180. <if test="paramVcbo != null">param_vcbo = #{paramVcbo},</if>
  181. <if test="paramVceo != null">param_vceo = #{paramVceo},</if>
  182. <if test="paramVebo != null">param_vebo = #{paramVebo},</if>
  183. <if test="paramVdss != null">param_vdss = #{paramVdss},</if>
  184. <if test="paramId != null">param_id = #{paramId},</if>
  185. <if test="paramRdsOn != null">param_RDS_on = #{paramRdsOn},</if>
  186. <if test="antistaticCapacity != null">antistatic_capacity = #{antistaticCapacity},</if>
  187. <if test="radiationResistance != null">radiation_resistance = #{radiationResistance},</if>
  188. <if test="materials != null">materials = #{materials},</if>
  189. <if test="craft != null">craft = #{craft},</if>
  190. <if test="weight != null">weight = #{weight},</if>
  191. <if test="createBy != null">create_by = #{createBy},</if>
  192. <if test="createTime != null">create_time = #{createTime},</if>
  193. <if test="updateBy != null">update_by = #{updateBy},</if>
  194. <if test="updateTime != null">update_time = #{updateTime},</if>
  195. <if test="remark != null">remark = #{remark},</if>
  196. </trim>
  197. where id = #{id}
  198. </update>
  199. <delete id="deleteTElectronComponentById" parameterType="Long">
  200. delete from t_electron_component where id = #{id}
  201. </delete>
  202. <delete id="deleteTElectronComponentByIds" parameterType="String">
  203. delete from t_electron_component where id in
  204. <foreach item="id" collection="array" open="(" separator="," close=")">
  205. #{id}
  206. </foreach>
  207. </delete>
  208. </mapper>