KwtWaybillOrderMapper.xml 8.4 KB

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