KwtWaybillOrderTicketMapper.xml 7.1 KB

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