1
0

ApiStoreGoodsGalleryMapper.xml 5.1 KB

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