1
0

OrderProcessRecordDao.xml 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254
  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.admin.dao.OrderProcessRecordDao">
  4. <resultMap type="com.kmall.admin.entity.OrderProcessRecordEntity" id="orderProcessRecordMap">
  5. <result property="id" column="id"/>
  6. <result property="orderSn" column="order_sn"/>
  7. <result property="userId" column="user_id"/>
  8. <result property="orderBizType" column="order_biz_type"/>
  9. <result property="addOrderStartTime" column="add_order_start_time"/>
  10. <result property="addOrderSuccTime" column="add_order_succ_time"/>
  11. <result property="isAddOrderSend" column="is_add_order_send"/>
  12. <result property="payStartTime" column="pay_start_time"/>
  13. <result property="paySuccTime" column="pay_succ_time"/>
  14. <result property="paymentStartTime" column="payment_start_time"/>
  15. <result property="paymentSuccTime" column="payment_succ_time"/>
  16. <result property="isPaymentSend" column="is_payment_send"/>
  17. <result property="eleOrderStartTime" column="ele_order_start_time"/>
  18. <result property="eleOrderSuccTime" column="ele_order_succ_time"/>
  19. <result property="isEleOrderSend" column="is_ele_order_send"/>
  20. <result property="waybillStartTime" column="waybill_start_time"/>
  21. <result property="waybillSuccTime" column="waybill_succ_time"/>
  22. <result property="logisticsNo" column="logistics_no"/>
  23. <result property="customsStartTime" column="customs_start_time"/>
  24. <result property="customsSuccTime" column="customs_succ_time"/>
  25. <result property="invtNo" column="invt_no"/>
  26. <result property="isCustomsSend" column="is_customs_send"/>
  27. <result property="shipmentStartTime" column="shipment_start_time"/>
  28. <result property="shipmentSuccTime" column="shipment_succ_time"/>
  29. <result property="processContent" column="process_content"/>
  30. <result property="tstm" column="tstm"/>
  31. <result property="payTransactionId" column="pay_transaction_id"/>
  32. </resultMap>
  33. <select id="queryObject" resultType="com.kmall.admin.entity.OrderProcessRecordEntity">
  34. select
  35. r.`id`,
  36. r.`order_sn`,
  37. r.`user_id`,
  38. r.`order_biz_type`,
  39. `add_order_start_time`,
  40. `add_order_succ_time`,
  41. `is_add_order_send`,
  42. `pay_start_time`,
  43. `pay_succ_time`,
  44. `payment_start_time`,
  45. `payment_succ_time`,
  46. `is_payment_send`,
  47. `ele_order_start_time`,
  48. `ele_order_succ_time`,
  49. `is_ele_order_send`,
  50. `waybill_start_time`,
  51. `waybill_succ_time`,
  52. `logistics_no`,
  53. `customs_start_time`,
  54. `customs_succ_time`,
  55. `invt_no`,
  56. `is_customs_send`,
  57. `shipment_start_time`,
  58. `shipment_succ_time`,
  59. `process_content`,
  60. r.`tstm`,
  61. o.pay_transaction_id
  62. from mall_order_process_record r inner join mall_order o on r.order_sn = o.order_sn
  63. where id = #{id}
  64. </select>
  65. <select id="queryObjectByOrderSn" resultType="com.kmall.admin.entity.OrderProcessRecordEntity">
  66. select
  67. r.`id`,
  68. r.`order_sn`,
  69. r.`user_id`,
  70. r.`order_biz_type`,
  71. `add_order_start_time`,
  72. `add_order_succ_time`,
  73. `is_add_order_send`,
  74. `pay_start_time`,
  75. `pay_succ_time`,
  76. `payment_start_time`,
  77. `payment_succ_time`,
  78. `is_payment_send`,
  79. `ele_order_start_time`,
  80. `ele_order_succ_time`,
  81. `is_ele_order_send`,
  82. `waybill_start_time`,
  83. `waybill_succ_time`,
  84. `logistics_no`,
  85. `customs_start_time`,
  86. `customs_succ_time`,
  87. `invt_no`,
  88. `is_customs_send`,
  89. `shipment_start_time`,
  90. `shipment_succ_time`,
  91. `process_content`,
  92. r.`tstm`,
  93. o.pay_transaction_id
  94. from mall_order_process_record r inner join mall_order o on r.order_sn = o.order_sn
  95. where r.order_sn = #{orderSn}
  96. </select>
  97. <select id="queryList" resultType="com.kmall.admin.entity.OrderProcessRecordEntity">
  98. select
  99. `id`,
  100. `order_sn`,
  101. `user_id`,
  102. `order_biz_type`,
  103. `add_order_start_time`,
  104. `add_order_succ_time`,
  105. `is_add_order_send`,
  106. `pay_start_time`,
  107. `pay_succ_time`,
  108. `payment_start_time`,
  109. `payment_succ_time`,
  110. `is_payment_send`,
  111. `ele_order_start_time`,
  112. `ele_order_succ_time`,
  113. `is_ele_order_send`,
  114. `waybill_start_time`,
  115. `waybill_succ_time`,
  116. `logistics_no`,
  117. `customs_start_time`,
  118. `customs_succ_time`,
  119. `invt_no`,
  120. `is_customs_send`,
  121. `shipment_start_time`,
  122. `shipment_succ_time`,
  123. `process_content`,
  124. `tstm`
  125. from mall_order_process_record
  126. WHERE 1=1
  127. <if test="name != null and name.trim() != ''">
  128. AND name LIKE concat('%',#{name},'%')
  129. </if>
  130. <choose>
  131. <when test="sidx != null and sidx.trim() != ''">
  132. order by ${sidx} ${order}
  133. </when>
  134. <otherwise>
  135. order by id desc
  136. </otherwise>
  137. </choose>
  138. <if test="offset != null and limit != null">
  139. limit #{offset}, #{limit}
  140. </if>
  141. </select>
  142. <select id="queryTotal" resultType="int">
  143. select count(*) from mall_order_process_record
  144. WHERE 1=1
  145. <if test="name != null and name.trim() != ''">
  146. AND name LIKE concat('%',#{name},'%')
  147. </if>
  148. </select>
  149. <insert id="save" parameterType="com.kmall.admin.entity.OrderProcessRecordEntity" useGeneratedKeys="true" keyProperty="id">
  150. insert into mall_order_process_record(
  151. `order_sn`,
  152. `user_id`,
  153. `order_biz_type`,
  154. `add_order_start_time`,
  155. `add_order_succ_time`,
  156. `is_add_order_send`,
  157. `pay_start_time`,
  158. `pay_succ_time`,
  159. `payment_start_time`,
  160. `payment_succ_time`,
  161. `is_payment_send`,
  162. `ele_order_start_time`,
  163. `ele_order_succ_time`,
  164. `is_ele_order_send`,
  165. `waybill_start_time`,
  166. `waybill_succ_time`,
  167. `logistics_no`,
  168. `customs_start_time`,
  169. `customs_succ_time`,
  170. `invt_no`,
  171. `is_customs_send`,
  172. `shipment_start_time`,
  173. `shipment_succ_time`,
  174. `process_content`,
  175. `tstm`)
  176. values(
  177. #{orderSn},
  178. #{userId},
  179. #{orderBizType},
  180. #{addOrderStartTime},
  181. #{addOrderSuccTime},
  182. #{isAddOrderSend},
  183. #{payStartTime},
  184. #{paySuccTime},
  185. #{paymentStartTime},
  186. #{paymentSuccTime},
  187. #{isPaymentSend},
  188. #{eleOrderStartTime},
  189. #{eleOrderSuccTime},
  190. #{isEleOrderSend},
  191. #{waybillStartTime},
  192. #{waybillSuccTime},
  193. #{logisticsNo},
  194. #{customsStartTime},
  195. #{customsSuccTime},
  196. #{invtNo},
  197. #{isCustomsSend},
  198. #{shipmentStartTime},
  199. #{shipmentSuccTime},
  200. #{processContent},
  201. #{tstm})
  202. </insert>
  203. <update id="update" parameterType="com.kmall.admin.entity.OrderProcessRecordEntity">
  204. update mall_order_process_record
  205. <set>
  206. <if test="orderSn != null">`order_sn` = #{orderSn}, </if>
  207. <if test="userId != null">`user_id` = #{userId}, </if>
  208. <if test="orderBizType != null">`order_biz_type` = #{orderBizType}, </if>
  209. <if test="addOrderStartTime != null">`add_order_start_time` = #{addOrderStartTime}, </if>
  210. <if test="addOrderSuccTime != null">`add_order_succ_time` = #{addOrderSuccTime}, </if>
  211. <if test="isAddOrderSend != null">`is_add_order_send` = #{isAddOrderSend}, </if>
  212. <if test="payStartTime != null">`pay_start_time` = #{payStartTime}, </if>
  213. <if test="paySuccTime != null">`pay_succ_time` = #{paySuccTime}, </if>
  214. <if test="paymentStartTime != null">`payment_start_time` = #{paymentStartTime}, </if>
  215. <if test="paymentSuccTime != null">`payment_succ_time` = #{paymentSuccTime}, </if>
  216. <if test="isPaymentSend != null">`is_payment_send` = #{isPaymentSend}, </if>
  217. <if test="eleOrderStartTime != null">`ele_order_start_time` = #{eleOrderStartTime}, </if>
  218. <if test="eleOrderSuccTime != null">`ele_order_succ_time` = #{eleOrderSuccTime}, </if>
  219. <if test="isEleOrderSend != null">`is_ele_order_send` = #{isEleOrderSend}, </if>
  220. <if test="waybillStartTime != null">`waybill_start_time` = #{waybillStartTime}, </if>
  221. <if test="waybillSuccTime != null">`waybill_succ_time` = #{waybillSuccTime}, </if>
  222. <if test="logisticsNo != null">`logistics_no` = #{logisticsNo}, </if>
  223. <if test="customsStartTime != null">`customs_start_time` = #{customsStartTime}, </if>
  224. <if test="customsSuccTime != null">`customs_succ_time` = #{customsSuccTime}, </if>
  225. <if test="invtNo != null">`invt_no` = #{invtNo}, </if>
  226. <if test="isCustomsSend != null">`is_customs_send` = #{isCustomsSend}, </if>
  227. <if test="shipmentStartTime != null">`shipment_start_time` = #{shipmentStartTime}, </if>
  228. <if test="shipmentSuccTime != null">`shipment_succ_time` = #{shipmentSuccTime}, </if>
  229. <if test="processContent != null">`process_content` = #{processContent}, </if>
  230. <if test="tstm != null">`tstm` = #{tstm}</if>
  231. </set>
  232. where id = #{id}
  233. </update>
  234. <delete id="delete">
  235. delete from mall_order_process_record where id = #{value}
  236. </delete>
  237. <delete id="deleteBatch">
  238. delete from mall_order_process_record where id in
  239. <foreach item="id" collection="array" open="(" separator="," close=")">
  240. #{id}
  241. </foreach>
  242. </delete>
  243. </mapper>