InstallBatchMapper.xml 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3. <mapper namespace="com.bz.smart_city.dao.assistant.InstallBatchMapper">
  4. <resultMap id="BaseResultMap" type="com.bz.smart_city.entity.assistant.InstallBatch">
  5. <!--@mbg.generated-->
  6. <id column="id" property="id" />
  7. <result column="site_id" property="siteId" />
  8. <result column="batch_name" property="batchName" />
  9. <result column="batch_date" property="batchDate" />
  10. <result column="related_file" property="relatedFile" />
  11. <result column="related_plan_id" property="relatedPlanId" />
  12. <result column="batch_status" property="batchStatus" />
  13. <result column="status" property="status" />
  14. <result column="create_by" property="createBy" />
  15. <result column="update_by" property="updateBy" />
  16. <result column="date_create" property="dateCreate" />
  17. <result column="date_update" property="dateUpdate" />
  18. <result column="remark" property="remark" />
  19. </resultMap>
  20. <sql id="Base_Column_List">
  21. <!--@mbg.generated-->
  22. id, site_id, batch_name, batch_date, related_file, related_plan_id, batch_status,
  23. `status`, create_by, update_by, date_create, date_update, remark
  24. </sql>
  25. <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
  26. <!--@mbg.generated-->
  27. select
  28. <include refid="Base_Column_List" />
  29. from sc_install_batch
  30. where id = #{id}
  31. </select>
  32. <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.bz.smart_city.entity.assistant.InstallBatch" useGeneratedKeys="true">
  33. <!--@mbg.generated-->
  34. insert into sc_install_batch (site_id, batch_name, batch_date, related_file, related_plan_id,
  35. batch_status, `status`, create_by, update_by, date_create, date_update,
  36. remark)
  37. values (#{siteId}, #{batchName}, #{batchDate}, #{relatedFile}, #{relatedPlanId},
  38. #{batchStatus}, #{status}, #{createBy}, #{updateBy}, #{dateCreate}, #{dateUpdate},
  39. #{remark})
  40. </insert>
  41. <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.bz.smart_city.entity.assistant.InstallBatch" useGeneratedKeys="true">
  42. <!--@mbg.generated-->
  43. insert into sc_install_batch
  44. <trim prefix="(" suffix=")" suffixOverrides=",">
  45. <if test="siteId != null">
  46. site_id,
  47. </if>
  48. <if test="batchName != null">
  49. batch_name,
  50. </if>
  51. <if test="batchDate != null">
  52. batch_date,
  53. </if>
  54. <if test="relatedFile != null">
  55. related_file,
  56. </if>
  57. <if test="relatedPlanId != null">
  58. related_plan_id,
  59. </if>
  60. <if test="batchStatus != null">
  61. batch_status,
  62. </if>
  63. <if test="status != null">
  64. `status`,
  65. </if>
  66. <if test="createBy != null">
  67. create_by,
  68. </if>
  69. <if test="updateBy != null">
  70. update_by,
  71. </if>
  72. <if test="dateCreate != null">
  73. date_create,
  74. </if>
  75. <if test="dateUpdate != null">
  76. date_update,
  77. </if>
  78. <if test="remark != null">
  79. remark,
  80. </if>
  81. </trim>
  82. <trim prefix="values (" suffix=")" suffixOverrides=",">
  83. <if test="siteId != null">
  84. #{siteId},
  85. </if>
  86. <if test="batchName != null">
  87. #{batchName},
  88. </if>
  89. <if test="batchDate != null">
  90. #{batchDate},
  91. </if>
  92. <if test="relatedFile != null">
  93. #{relatedFile},
  94. </if>
  95. <if test="relatedPlanId != null">
  96. #{relatedPlanId},
  97. </if>
  98. <if test="batchStatus != null">
  99. #{batchStatus},
  100. </if>
  101. <if test="status != null">
  102. #{status},
  103. </if>
  104. <if test="createBy != null">
  105. #{createBy},
  106. </if>
  107. <if test="updateBy != null">
  108. #{updateBy},
  109. </if>
  110. <if test="dateCreate != null">
  111. #{dateCreate},
  112. </if>
  113. <if test="dateUpdate != null">
  114. #{dateUpdate},
  115. </if>
  116. <if test="remark != null">
  117. #{remark},
  118. </if>
  119. </trim>
  120. </insert>
  121. <update id="updateByPrimaryKeySelective" parameterType="com.bz.smart_city.entity.assistant.InstallBatch">
  122. <!--@mbg.generated-->
  123. update sc_install_batch
  124. <set>
  125. <if test="siteId != null">
  126. site_id = #{siteId},
  127. </if>
  128. <if test="batchName != null">
  129. batch_name = #{batchName},
  130. </if>
  131. <if test="batchDate != null">
  132. batch_date = #{batchDate},
  133. </if>
  134. <if test="relatedFile != null">
  135. related_file = #{relatedFile},
  136. </if>
  137. <if test="relatedPlanId != null">
  138. related_plan_id = #{relatedPlanId},
  139. </if>
  140. <if test="batchStatus != null">
  141. batch_status = #{batchStatus},
  142. </if>
  143. <if test="status != null">
  144. `status` = #{status},
  145. </if>
  146. <if test="createBy != null">
  147. create_by = #{createBy},
  148. </if>
  149. <if test="updateBy != null">
  150. update_by = #{updateBy},
  151. </if>
  152. <if test="dateCreate != null">
  153. date_create = #{dateCreate},
  154. </if>
  155. <if test="dateUpdate != null">
  156. date_update = #{dateUpdate},
  157. </if>
  158. <if test="remark != null">
  159. remark = #{remark},
  160. </if>
  161. </set>
  162. where id = #{id}
  163. </update>
  164. </mapper>