ApiStoreMngChangeMapper.xml 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  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.kmall.api.dao.ApiStoreMngChangeMapper" >
  4. <resultMap id="BaseResultMap" type="com.kmall.api.entity.MallStoreMngChange" >
  5. <id column="id" property="id" jdbcType="INTEGER" />
  6. <result column="store_change_num" property="storeChangeNum" jdbcType="INTEGER" />
  7. <result column="store_original_num" property="storeOriginalNum" jdbcType="INTEGER" />
  8. <result column="store_valid_num" property="storeValidNum" jdbcType="INTEGER" />
  9. <result column="merch_sn" property="merchSn" jdbcType="VARCHAR" />
  10. <result column="store_id" property="storeId" jdbcType="INTEGER" />
  11. <result column="sku" property="sku" jdbcType="VARCHAR" />
  12. <result column="is_valid" property="isValid" jdbcType="INTEGER" />
  13. <result column="creater_sn" property="createrSn" jdbcType="VARCHAR" />
  14. <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
  15. <result column="moder_sn" property="moderSn" jdbcType="VARCHAR" />
  16. <result column="mod_time" property="modTime" jdbcType="TIMESTAMP" />
  17. <result column="tstm" property="tstm" jdbcType="TIMESTAMP" />
  18. </resultMap>
  19. <sql id="Base_Column_List" >
  20. id, store_change_num, store_original_num, store_valid_num, merch_sn, store_id, sku,
  21. is_valid, creater_sn, create_time, moder_sn, mod_time, tstm
  22. </sql>
  23. <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
  24. select
  25. <include refid="Base_Column_List" />
  26. from mall_store_mng_change
  27. where id = #{id,jdbcType=INTEGER}
  28. </select>
  29. <delete id="delete" parameterType="java.lang.Integer" >
  30. delete from mall_store_mng_change
  31. where id = #{id,jdbcType=INTEGER}
  32. </delete>
  33. <insert id="save" parameterType="com.kmall.api.entity.MallStoreMngChange" useGeneratedKeys="true" keyProperty="id">
  34. insert into mall_store_mng_change
  35. <trim prefix="(" suffix=")" suffixOverrides="," >
  36. <if test="id != null" >
  37. id,
  38. </if>
  39. <if test="storeChangeNum != null" >
  40. store_change_num,
  41. </if>
  42. <if test="storeOriginalNum != null" >
  43. store_original_num,
  44. </if>
  45. <if test="storeValidNum != null" >
  46. store_valid_num,
  47. </if>
  48. <if test="merchSn != null" >
  49. merch_sn,
  50. </if>
  51. <if test="storeId != null" >
  52. store_id,
  53. </if>
  54. <if test="sku != null" >
  55. sku,
  56. </if>
  57. <if test="isValid != null" >
  58. is_valid,
  59. </if>
  60. <if test="createrSn != null" >
  61. creater_sn,
  62. </if>
  63. <if test="createTime != null" >
  64. create_time,
  65. </if>
  66. <if test="moderSn != null" >
  67. moder_sn,
  68. </if>
  69. <if test="modTime != null" >
  70. mod_time,
  71. </if>
  72. <if test="tstm != null" >
  73. tstm,
  74. </if>
  75. </trim>
  76. <trim prefix="values (" suffix=")" suffixOverrides="," >
  77. <if test="id != null" >
  78. #{id,jdbcType=INTEGER},
  79. </if>
  80. <if test="storeChangeNum != null" >
  81. #{storeChangeNum,jdbcType=INTEGER},
  82. </if>
  83. <if test="storeOriginalNum != null" >
  84. #{storeOriginalNum,jdbcType=INTEGER},
  85. </if>
  86. <if test="storeValidNum != null" >
  87. #{storeValidNum,jdbcType=INTEGER},
  88. </if>
  89. <if test="merchSn != null" >
  90. #{merchSn,jdbcType=VARCHAR},
  91. </if>
  92. <if test="storeId != null" >
  93. #{storeId,jdbcType=INTEGER},
  94. </if>
  95. <if test="sku != null" >
  96. #{sku,jdbcType=VARCHAR},
  97. </if>
  98. <if test="isValid != null" >
  99. #{isValid,jdbcType=INTEGER},
  100. </if>
  101. <if test="createrSn != null" >
  102. #{createrSn,jdbcType=VARCHAR},
  103. </if>
  104. <if test="createTime != null" >
  105. #{createTime,jdbcType=TIMESTAMP},
  106. </if>
  107. <if test="moderSn != null" >
  108. #{moderSn,jdbcType=VARCHAR},
  109. </if>
  110. <if test="modTime != null" >
  111. #{modTime,jdbcType=TIMESTAMP},
  112. </if>
  113. <if test="tstm != null" >
  114. #{tstm,jdbcType=TIMESTAMP},
  115. </if>
  116. </trim>
  117. </insert>
  118. <update id="update" parameterType="com.kmall.api.entity.MallStoreMngChange" >
  119. update mall_store_mng_change
  120. <set >
  121. <if test="storeChangeNum != null" >
  122. store_change_num = #{storeChangeNum,jdbcType=INTEGER},
  123. </if>
  124. <if test="storeOriginalNum != null" >
  125. store_original_num = #{storeOriginalNum,jdbcType=INTEGER},
  126. </if>
  127. <if test="storeValidNum != null" >
  128. store_valid_num = #{storeValidNum,jdbcType=INTEGER},
  129. </if>
  130. <if test="merchSn != null" >
  131. merch_sn = #{merchSn,jdbcType=VARCHAR},
  132. </if>
  133. <if test="storeId != null" >
  134. store_id = #{storeId,jdbcType=INTEGER},
  135. </if>
  136. <if test="sku != null" >
  137. sku = #{sku,jdbcType=VARCHAR},
  138. </if>
  139. <if test="isValid != null" >
  140. is_valid = #{isValid,jdbcType=INTEGER},
  141. </if>
  142. <if test="createrSn != null" >
  143. creater_sn = #{createrSn,jdbcType=VARCHAR},
  144. </if>
  145. <if test="createTime != null" >
  146. create_time = #{createTime,jdbcType=TIMESTAMP},
  147. </if>
  148. <if test="moderSn != null" >
  149. moder_sn = #{moderSn,jdbcType=VARCHAR},
  150. </if>
  151. <if test="modTime != null" >
  152. mod_time = #{modTime,jdbcType=TIMESTAMP},
  153. </if>
  154. <if test="tstm != null" >
  155. tstm = #{tstm,jdbcType=TIMESTAMP},
  156. </if>
  157. </set>
  158. where id = #{id,jdbcType=INTEGER}
  159. </update>
  160. </mapper>