KwtLogisticsOrderGoodsMapper.xml 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  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.sckw.transport.dao.KwtLogisticsOrderGoodsMapper">
  4. <resultMap id="BaseResultMap" type="com.sckw.transport.model.KwtLogisticsOrderGoods">
  5. <id column="id" jdbcType="BIGINT" property="id" />
  6. <result column="l_order_id" jdbcType="BIGINT" property="lOrderId" />
  7. <result column="order_no" jdbcType="VARCHAR" property="lOrderNo" />
  8. <result column="goods_id" jdbcType="BIGINT" property="goodsId" />
  9. <result column="goods_name" jdbcType="VARCHAR" property="goodsName" />
  10. <result column="sku_id" jdbcType="BIGINT" property="skuId" />
  11. <result column="remark" jdbcType="VARCHAR" property="remark" />
  12. <result column="status" jdbcType="INTEGER" property="status" />
  13. <result column="create_by" jdbcType="BIGINT" property="createBy" />
  14. <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
  15. <result column="update_by" jdbcType="BIGINT" property="updateBy" />
  16. <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
  17. <result column="del_flag" jdbcType="INTEGER" property="delFlag" />
  18. </resultMap>
  19. <sql id="Base_Column_List">
  20. id, l_order_id, l_order_no, goods_id, sku_id, remark, `status`, create_by, create_time,
  21. update_by, update_time, del_flag,goods_name
  22. </sql>
  23. <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
  24. select
  25. <include refid="Base_Column_List" />
  26. from kwt_logistics_order_goods
  27. where id = #{id,jdbcType=BIGINT}
  28. </select>
  29. <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
  30. delete from kwt_logistics_order_goods
  31. where id = #{id,jdbcType=BIGINT}
  32. </delete>
  33. <!-- <insert id="insert" parameterType="com.sckw.transport.model.KwtLogisticsOrderGoods">-->
  34. <!-- insert into kwt_logistics_order_goods (id, l_order_id, l_order_no,-->
  35. <!-- goods_id, sku_id, remark,-->
  36. <!-- `status`, create_by, create_time,-->
  37. <!-- update_by, update_time, del_flag-->
  38. <!-- )-->
  39. <!-- values (#{id,jdbcType=BIGINT}, #{lOrderId,jdbcType=BIGINT}, #{lOrderNo,jdbcType=VARCHAR},-->
  40. <!-- #{goodsId,jdbcType=BIGINT}, #{skuId,jdbcType=BIGINT}, #{remark,jdbcType=VARCHAR},-->
  41. <!-- #{status,jdbcType=INTEGER}, #{createBy,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP},-->
  42. <!-- #{updateBy,jdbcType=BIGINT}, #{updateTime,jdbcType=TIMESTAMP}, #{delFlag,jdbcType=INTEGER}-->
  43. <!-- )-->
  44. <!-- </insert>-->
  45. <insert id="insertSelective" parameterType="com.sckw.transport.model.KwtLogisticsOrderGoods">
  46. insert into kwt_logistics_order_goods
  47. <trim prefix="(" suffix=")" suffixOverrides=",">
  48. <if test="id != null">
  49. id,
  50. </if>
  51. <if test="lOrderId != null">
  52. l_order_id,
  53. </if>
  54. <if test="lOrderNo != null">
  55. l_order_no,
  56. </if>
  57. <if test="goodsId != null">
  58. goods_id,
  59. </if>
  60. <if test="skuId != null">
  61. sku_id,
  62. </if>
  63. <if test="remark != null">
  64. remark,
  65. </if>
  66. <if test="status != null">
  67. `status`,
  68. </if>
  69. <if test="createBy != null">
  70. create_by,
  71. </if>
  72. <if test="createTime != null">
  73. create_time,
  74. </if>
  75. <if test="updateBy != null">
  76. update_by,
  77. </if>
  78. <if test="updateTime != null">
  79. update_time,
  80. </if>
  81. <if test="delFlag != null">
  82. del_flag,
  83. </if>
  84. </trim>
  85. <trim prefix="values (" suffix=")" suffixOverrides=",">
  86. <if test="id != null">
  87. #{id,jdbcType=BIGINT},
  88. </if>
  89. <if test="lOrderId != null">
  90. #{lOrderId,jdbcType=BIGINT},
  91. </if>
  92. <if test="lOrderNo != null">
  93. #{lOrderNo,jdbcType=VARCHAR},
  94. </if>
  95. <if test="goodsId != null">
  96. #{goodsId,jdbcType=BIGINT},
  97. </if>
  98. <if test="skuId != null">
  99. #{skuId,jdbcType=BIGINT},
  100. </if>
  101. <if test="remark != null">
  102. #{remark,jdbcType=VARCHAR},
  103. </if>
  104. <if test="status != null">
  105. #{status,jdbcType=INTEGER},
  106. </if>
  107. <if test="createBy != null">
  108. #{createBy,jdbcType=BIGINT},
  109. </if>
  110. <if test="createTime != null">
  111. #{createTime,jdbcType=TIMESTAMP},
  112. </if>
  113. <if test="updateBy != null">
  114. #{updateBy,jdbcType=BIGINT},
  115. </if>
  116. <if test="updateTime != null">
  117. #{updateTime,jdbcType=TIMESTAMP},
  118. </if>
  119. <if test="delFlag != null">
  120. #{delFlag,jdbcType=INTEGER},
  121. </if>
  122. </trim>
  123. </insert>
  124. <update id="updateByPrimaryKeySelective" parameterType="com.sckw.transport.model.KwtLogisticsOrderGoods">
  125. update kwt_logistics_order_goods
  126. <set>
  127. <if test="lOrderId != null">
  128. l_order_id = #{lOrderId,jdbcType=BIGINT},
  129. </if>
  130. <if test="lOrderNo != null">
  131. l_order_no = #{lOrderNo,jdbcType=VARCHAR},
  132. </if>
  133. <if test="goodsId != null">
  134. goods_id = #{goodsId,jdbcType=BIGINT},
  135. </if>
  136. <if test="skuId != null">
  137. sku_id = #{skuId,jdbcType=BIGINT},
  138. </if>
  139. <if test="remark != null">
  140. remark = #{remark,jdbcType=VARCHAR},
  141. </if>
  142. <if test="status != null">
  143. `status` = #{status,jdbcType=INTEGER},
  144. </if>
  145. <if test="createBy != null">
  146. create_by = #{createBy,jdbcType=BIGINT},
  147. </if>
  148. <if test="createTime != null">
  149. create_time = #{createTime,jdbcType=TIMESTAMP},
  150. </if>
  151. <if test="updateBy != null">
  152. update_by = #{updateBy,jdbcType=BIGINT},
  153. </if>
  154. <if test="updateTime != null">
  155. update_time = #{updateTime,jdbcType=TIMESTAMP},
  156. </if>
  157. <if test="delFlag != null">
  158. del_flag = #{delFlag,jdbcType=INTEGER},
  159. </if>
  160. </set>
  161. where id = #{id,jdbcType=BIGINT}
  162. </update>
  163. <update id="updateByPrimaryKey" parameterType="com.sckw.transport.model.KwtLogisticsOrderGoods">
  164. update kwt_logistics_order_goods
  165. set l_order_id = #{lOrderId,jdbcType=BIGINT},
  166. l_order_no = #{lOrderNo,jdbcType=VARCHAR},
  167. goods_id = #{goodsId,jdbcType=BIGINT},
  168. sku_id = #{skuId,jdbcType=BIGINT},
  169. remark = #{remark,jdbcType=VARCHAR},
  170. `status` = #{status,jdbcType=INTEGER},
  171. create_by = #{createBy,jdbcType=BIGINT},
  172. create_time = #{createTime,jdbcType=TIMESTAMP},
  173. update_by = #{updateBy,jdbcType=BIGINT},
  174. update_time = #{updateTime,jdbcType=TIMESTAMP},
  175. del_flag = #{delFlag,jdbcType=INTEGER}
  176. where id = #{id,jdbcType=BIGINT}
  177. </update>
  178. <select id="findByGoods" resultType="com.sckw.transport.model.KwtLogisticsOrderGoods" >
  179. SELECT
  180. id, l_order_id lOrderId, l_order_no lOrderNo, goods_id goodsId, goods_name goodsName, sku_id skuId,
  181. remark, `status`, create_by createBy, create_time createTime, update_by updateBy, update_time updateTime
  182. from kwt_logistics_order_goods
  183. where del_flag = 0
  184. and l_order_id = #{lOrderId, jdbcType=BIGINT}
  185. </select>
  186. </mapper>