1
0

OrderProcessRecordDao.xml 8.0 KB

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