MallPaymentOrderDataDao.xml 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570
  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.MallPaymentOrderDataDao">
  4. <resultMap type="com.kmall.admin.entity.MallPaymentOrderDataEntity" id="mall2PaymentOrderDataMap">
  5. <result property="payOrderId" column="pay_order_id"/>
  6. <result property="merchantName" column="merchant_name"/>
  7. <result property="outTradeNo" column="out_trade_no"/>
  8. <result property="payMoney" column="pay_money"/>
  9. <result property="refundMoney" column="refund_money"/>
  10. <result property="payType" column="pay_type"/>
  11. <result property="paymentType" column="payment_type"/>
  12. <result property="transactionOrder" column="transaction_order"/>
  13. <result property="timeStr" column="time_str"/>
  14. <result property="attach" column="attach"/>
  15. <result property="transactionStatus" column="transaction_status"/>
  16. <result property="currencyType" column="currency_type"/>
  17. <result property="amountOrder" column="Amount_order"/>
  18. <result property="refundId" column="refund_id"/>
  19. <result property="merRefundNumber" column="mer_refund_number"/>
  20. <result property="refundType" column="refund_type"/>
  21. <result property="refundStatus" column="refund_status"/>
  22. <result property="applyRefundAmount" column="apply_refund_amount"/>
  23. <result property="cashCoupon" column="cash_coupon"/>
  24. <result property="refundRechargpCoupon" column="refund_rechargp_coupon"/>
  25. <result property="feeCharge" column="fee_charge"/>
  26. <result property="rate" column="rate"/>
  27. <result property="payFlag" column="pay_flag"/>
  28. <result property="serialNumber" column="serial_number"/>
  29. <result property="oppositeAccount" column="opposite_account"/>
  30. <result property="otherName" column="other_name"/>
  31. <result property="bankOrder" column="bank_order"/>
  32. <result property="businessBasicOrder" column="business_basic_order"/>
  33. <result property="businessBillingSource" column="business_billing_source"/>
  34. <result property="businessOrder" column="business_order"/>
  35. <result property="businessDescription" column="business_description"/>
  36. <result property="remark" column="remark"/>
  37. <result property="rateRemark" column="rate_remark"/>
  38. <result property="paymentNotes" column="payment_notes"/>
  39. <result property="createrSn" column="creater_sn"/>
  40. <result property="createTime" column="create_time"/>
  41. <result property="moderSn" column="moder_sn"/>
  42. <result property="modTime" column="mod_time"/>
  43. <result property="tstm" column="tstm"/>
  44. </resultMap>
  45. <select id="queryObject" resultType="com.kmall.admin.entity.MallPaymentOrderDataEntity">
  46. select
  47. `pay_order_id`,
  48. `merchant_name`,
  49. `out_trade_no`,
  50. `pay_money`,
  51. `refund_money`,
  52. `pay_type`,
  53. `payment_type`,
  54. `transaction_order`,
  55. `time_str`,
  56. `attach`,
  57. `transaction_status`,
  58. `currency_type`,
  59. `Amount_order`,
  60. `refund_id`,
  61. `mer_refund_number`,
  62. `refund_type`,
  63. `refund_status`,
  64. `apply_refund_amount`,
  65. `cash_coupon`,
  66. `refund_rechargp_coupon`,
  67. `fee_charge`,
  68. `rate`,
  69. `pay_flag`,
  70. `serial_number`,
  71. `opposite_account`,
  72. `other_name`,
  73. `bank_order`,
  74. `business_basic_order`,
  75. `business_billing_source`,
  76. `business_order`,
  77. `business_description`,
  78. `remark`,
  79. `rate_remark`,
  80. `payment_notes`,
  81. `creater_sn`,
  82. `create_time`,
  83. `moder_sn`,
  84. `mod_time`,
  85. `tstm`
  86. from mall2_payment_order_data
  87. where pay_order_id = #{id}
  88. </select>
  89. <select id="queryList" resultType="com.kmall.admin.entity.MallPaymentOrderDataEntity">
  90. select
  91. `pay_order_id`,
  92. `merchant_name`,
  93. `out_trade_no`,
  94. `pay_money`,
  95. `refund_money`,
  96. `pay_type`,
  97. `payment_type`,
  98. `transaction_order`,
  99. `time_str`,
  100. `attach`,
  101. `transaction_status`,
  102. `currency_type`,
  103. `Amount_order`,
  104. `refund_id`,
  105. `mer_refund_number`,
  106. `refund_type`,
  107. `refund_status`,
  108. `apply_refund_amount`,
  109. `cash_coupon`,
  110. `refund_rechargp_coupon`,
  111. `fee_charge`,
  112. `rate`,
  113. `pay_flag`,
  114. `serial_number`,
  115. `opposite_account`,
  116. `other_name`,
  117. `bank_order`,
  118. `business_basic_order`,
  119. `business_billing_source`,
  120. `business_order`,
  121. `business_description`,
  122. `remark`,
  123. `rate_remark`,
  124. `payment_notes`,
  125. `creater_sn`,
  126. `create_time`,
  127. `moder_sn`,
  128. `mod_time`,
  129. `tstm`
  130. from mall2_payment_order_data
  131. WHERE 1=1
  132. <if test="payFlag != null and payFlag.trim() != ''">
  133. AND pay_flag = #{payFlag}
  134. </if>
  135. <if test="startTime != null and startTime != ''">
  136. AND time_str <![CDATA[ > ]]> #{startTime}
  137. </if>
  138. <if test="endTime != null and endTime != ''">
  139. AND time_str <![CDATA[ < ]]> #{endTime}
  140. </if>
  141. <choose>
  142. <when test="sidx != null and sidx.trim() != ''">
  143. order by ${sidx} ${order}
  144. </when>
  145. <otherwise>
  146. order by pay_order_id desc
  147. </otherwise>
  148. </choose>
  149. <if test="offset != null and limit != null">
  150. limit #{offset}, #{limit}
  151. </if>
  152. </select>
  153. <select id="queryListData" resultType="com.kmall.admin.entity.MallPaymentOrderDataEntity">
  154. select
  155. `pay_order_id`,
  156. `merchant_name`,
  157. `out_trade_no`,
  158. `pay_money`,
  159. `refund_money`,
  160. `pay_type`,
  161. `payment_type`,
  162. `transaction_order`,
  163. `time_str`,
  164. `attach`,
  165. `transaction_status`,
  166. `currency_type`,
  167. `Amount_order`,
  168. `refund_id`,
  169. `mer_refund_number`,
  170. `refund_type`,
  171. `refund_status`,
  172. `apply_refund_amount`,
  173. `cash_coupon`,
  174. `refund_rechargp_coupon`,
  175. `fee_charge`,
  176. `rate`,
  177. `pay_flag`,
  178. `serial_number`,
  179. `opposite_account`,
  180. `other_name`,
  181. `bank_order`,
  182. `business_basic_order`,
  183. `business_billing_source`,
  184. `business_order`,
  185. `business_description`,
  186. `remark`,
  187. `rate_remark`,
  188. `payment_notes`,
  189. `creater_sn`,
  190. `create_time`,
  191. `moder_sn`,
  192. `mod_time`,
  193. `tstm`
  194. from mall2_payment_order_data
  195. WHERE 1=1
  196. <if test="payFlag != null and payFlag.trim() != ''">
  197. AND pay_flag = #{payFlag}
  198. </if>
  199. <if test="startTime != null and startTime != ''">
  200. AND time_str <![CDATA[ > ]]> #{startTime}
  201. </if>
  202. <if test="endTime != null and endTime != ''">
  203. AND time_str <![CDATA[ < ]]> #{endTime}
  204. </if>
  205. </select>
  206. <select id="queryTotal" resultType="int">
  207. select count(*) from mall2_payment_order_data
  208. WHERE 1=1
  209. <if test="name != null and name.trim() != ''">
  210. AND name LIKE concat('%',#{name},'%')
  211. </if>
  212. </select>
  213. <insert id="save" parameterType="com.kmall.admin.entity.MallPaymentOrderDataEntity" useGeneratedKeys="true" keyProperty="payOrderId">
  214. insert into mall2_payment_order_data(
  215. `merchant_name`,
  216. `out_trade_no`,
  217. `pay_money`,
  218. `refund_money`,
  219. `pay_type`,
  220. `payment_type`,
  221. `transaction_order`,
  222. `time_str`,
  223. `attach`,
  224. `transaction_status`,
  225. `currency_type`,
  226. `Amount_order`,
  227. `refund_id`,
  228. `mer_refund_number`,
  229. `refund_type`,
  230. `refund_status`,
  231. `apply_refund_amount`,
  232. `cash_coupon`,
  233. `refund_rechargp_coupon`,
  234. `fee_charge`,
  235. `rate`,
  236. `pay_flag`,
  237. `serial_number`,
  238. `opposite_account`,
  239. `other_name`,
  240. `bank_order`,
  241. `business_basic_order`,
  242. `business_billing_source`,
  243. `business_order`,
  244. `business_description`,
  245. `remark`,
  246. `rate_remark`,
  247. `payment_notes`,
  248. `creater_sn`,
  249. `create_time`
  250. )
  251. values(
  252. #{merchantName},
  253. #{outTradeNo},
  254. #{payMoney},
  255. #{refundMoney},
  256. #{payType},
  257. #{paymentType},
  258. #{transactionOrder},
  259. #{timeStr},
  260. #{attach},
  261. #{transactionStatus},
  262. #{currencyType},
  263. #{amountOrder},
  264. #{refundId},
  265. #{merRefundNumber},
  266. #{refundType},
  267. #{refundStatus},
  268. #{applyRefundAmount},
  269. #{cashCoupon},
  270. #{refundRechargpCoupon},
  271. #{feeCharge},
  272. #{rate},
  273. #{payFlag},
  274. #{serialNumber},
  275. #{oppositeAccount},
  276. #{otherName},
  277. #{bankOrder},
  278. #{businessBasicOrder},
  279. #{businessBillingSource},
  280. #{businessOrder},
  281. #{businessDescription},
  282. #{remark},
  283. #{rateRemark},
  284. #{paymentNotes},
  285. #{createrSn},
  286. #{createTime}
  287. </insert>
  288. <insert id="saveData" parameterType="com.kmall.admin.entity.MallPaymentOrderDataEntity" useGeneratedKeys="true" keyProperty="payOrderId">
  289. insert into mall2_payment_order_data
  290. <trim prefix="(" suffix=")" suffixOverrides="," >
  291. <if test="merchantName != null" >
  292. `merchant_name`,
  293. </if>
  294. <if test="outTradeNo != null" >
  295. `out_trade_no`,
  296. </if>
  297. <if test="payMoney != null" >
  298. `pay_money`,
  299. </if>
  300. <if test="refundMoney != null" >
  301. `refund_money`,
  302. </if>
  303. <if test="payType != null" >
  304. `pay_type`,
  305. </if>
  306. <if test="paymentType != null" >
  307. `payment_type`,
  308. </if>
  309. <if test="transactionOrder != null" >
  310. `transaction_order`,
  311. </if>
  312. <if test="timeStr != null" >
  313. `time_str`,
  314. </if>
  315. <if test="attach != null" >
  316. `attach`,
  317. </if>
  318. <if test="transactionStatus != null" >
  319. `transaction_status`,
  320. </if>
  321. <if test="currencyType != null" >
  322. `currency_type`,
  323. </if>
  324. <if test="amountOrder != null" >
  325. `Amount_order`,
  326. </if>
  327. <if test="refundId != null" >
  328. `refund_id`,
  329. </if>
  330. <if test="merRefundNumber != null" >
  331. `mer_refund_number`,
  332. </if>
  333. <if test="refundType != null" >
  334. `refund_type`,
  335. </if>
  336. <if test="refundStatus != null" >
  337. `refund_status`,
  338. </if>
  339. <if test="applyRefundAmount != null" >
  340. `apply_refund_amount`,
  341. </if>
  342. <if test="cashCoupon != null" >
  343. `cash_coupon`,
  344. </if>
  345. <if test="refundRechargpCoupon != null" >
  346. `refund_rechargp_coupon`,
  347. </if>
  348. <if test="feeCharge != null" >
  349. `fee_charge`,
  350. </if>
  351. <if test="rate != null" >
  352. `rate`,
  353. </if>
  354. <if test="payFlag != null" >
  355. `pay_flag`,
  356. </if>
  357. <if test="serialNumber != null" >
  358. `serial_number`,
  359. </if>
  360. <if test="oppositeAccount != null" >
  361. `opposite_account`,
  362. </if>
  363. <if test="otherName != null" >
  364. `other_name`,
  365. </if>
  366. <if test="bankOrder != null" >
  367. `bank_order`,
  368. </if>
  369. <if test="businessBasicOrder != null" >
  370. `business_basic_order`,
  371. </if>
  372. <if test="businessBillingSource != null" >
  373. `business_billing_source`,
  374. </if>
  375. <if test="businessOrder != null" >
  376. `business_order`,
  377. </if>
  378. <if test="businessDescription != null" >
  379. `business_description`,
  380. </if>
  381. <if test="remark != null" >
  382. `remark`,
  383. </if>
  384. <if test="rateRemark != null" >
  385. `rate_remark`,
  386. </if>
  387. <if test="paymentNotes != null" >
  388. `payment_notes`,
  389. </if>
  390. <if test="createrSn != null" >
  391. `creater_sn`,
  392. </if>
  393. <if test="createTime != null" >
  394. `create_time`,
  395. </if>
  396. </trim>
  397. <trim prefix="values (" suffix=")" suffixOverrides="," >
  398. <if test="merchantName != null" >
  399. #{merchantName},
  400. </if>
  401. <if test="outTradeNo != null" >
  402. #{outTradeNo},
  403. </if>
  404. <if test="payMoney != null" >
  405. #{payMoney},
  406. </if>
  407. <if test="refundMoney != null" >
  408. #{refundMoney},
  409. </if>
  410. <if test="payType != null" >
  411. #{payType},
  412. </if>
  413. <if test="paymentType != null" >
  414. #{paymentType},
  415. </if>
  416. <if test="transactionOrder != null" >
  417. #{transactionOrder},
  418. </if>
  419. <if test="timeStr != null" >
  420. #{timeStr},
  421. </if>
  422. <if test="attach != null" >
  423. #{attach},
  424. </if>
  425. <if test="transactionStatus != null" >
  426. #{transactionStatus},
  427. </if>
  428. <if test="currencyType != null" >
  429. #{currencyType},
  430. </if>
  431. <if test="amountOrder != null" >
  432. #{amountOrder},
  433. </if>
  434. <if test="refundId != null" >
  435. #{refundId},
  436. </if>
  437. <if test="merRefundNumber != null" >
  438. #{merRefundNumber},
  439. </if>
  440. <if test="refundType != null" >
  441. #{refundType},
  442. </if>
  443. <if test="refundStatus != null" >
  444. #{refundStatus},
  445. </if>
  446. <if test="applyRefundAmount != null" >
  447. #{applyRefundAmount},
  448. </if>
  449. <if test="cashCoupon != null" >
  450. #{cashCoupon},
  451. </if>
  452. <if test="refundRechargpCoupon != null" >
  453. #{refundRechargpCoupon},
  454. </if>
  455. <if test="feeCharge != null" >
  456. #{feeCharge},
  457. </if>
  458. <if test="rate != null" >
  459. #{rate},
  460. </if>
  461. <if test="payFlag != null" >
  462. #{payFlag},
  463. </if>
  464. <if test="serialNumber != null" >
  465. #{serialNumber},
  466. </if>
  467. <if test="oppositeAccount != null" >
  468. #{oppositeAccount},
  469. </if>
  470. <if test="otherName != null" >
  471. #{otherName},
  472. </if>
  473. <if test="bankOrder != null" >
  474. #{bankOrder},
  475. </if>
  476. <if test="businessBasicOrder != null" >
  477. #{businessBasicOrder},
  478. </if>
  479. <if test="businessBillingSource != null" >
  480. #{businessBillingSource},
  481. </if>
  482. <if test="businessOrder != null" >
  483. #{businessOrder},
  484. </if>
  485. <if test="businessDescription != null" >
  486. #{businessDescription},
  487. </if>
  488. <if test="remark != null" >
  489. #{remark},
  490. </if>
  491. <if test="rateRemark != null" >
  492. #{rateRemark},
  493. </if>
  494. <if test="paymentNotes != null" >
  495. #{paymentNotes},
  496. </if>
  497. <if test="createrSn != null" >
  498. #{createrSn},
  499. </if>
  500. <if test="createTime != null" >
  501. #{createTime},
  502. </if>
  503. </trim>
  504. </insert>
  505. <update id="update" parameterType="com.kmall.admin.entity.MallPaymentOrderDataEntity">
  506. update mall2_payment_order_data
  507. <set>
  508. <if test="merchantName != null">`merchant_name` = #{merchantName}, </if>
  509. <if test="outTradeNo != null">`out_trade_no` = #{outTradeNo}, </if>
  510. <if test="payMoney != null">`pay_money` = #{payMoney}, </if>
  511. <if test="refundMoney != null">`refund_money` = #{refundMoney}, </if>
  512. <if test="payType != null">`pay_type` = #{payType}, </if>
  513. <if test="paymentType != null">`payment_type` = #{paymentType}, </if>
  514. <if test="transactionOrder != null">`transaction_order` = #{transactionOrder}, </if>
  515. <if test="timeStr != null">`time_str` = #{timeStr}, </if>
  516. <if test="attach != null">`attach` = #{attach}, </if>
  517. <if test="transactionStatus != null">`transaction_status` = #{transactionStatus}, </if>
  518. <if test="currencyType != null">`currency_type` = #{currencyType}, </if>
  519. <if test="amountOrder != null">`Amount_order` = #{amountOrder}, </if>
  520. <if test="refundId != null">`refund_id` = #{refundId}, </if>
  521. <if test="merRefundNumber != null">`mer_refund_number` = #{merRefundNumber}, </if>
  522. <if test="refundType != null">`refund_type` = #{refundType}, </if>
  523. <if test="refundStatus != null">`refund_status` = #{refundStatus}, </if>
  524. <if test="applyRefundAmount != null">`apply_refund_amount` = #{applyRefundAmount}, </if>
  525. <if test="cashCoupon != null">`cash_coupon` = #{cashCoupon}, </if>
  526. <if test="refundRechargpCoupon != null">`refund_rechargp_coupon` = #{refundRechargpCoupon}, </if>
  527. <if test="feeCharge != null">`fee_charge` = #{feeCharge}, </if>
  528. <if test="rate != null">`rate` = #{rate}, </if>
  529. <if test="payFlag != null">`pay_flag` = #{payFlag}, </if>
  530. <if test="serialNumber != null">`serial_number` = #{serialNumber}, </if>
  531. <if test="oppositeAccount != null">`opposite_account` = #{oppositeAccount}, </if>
  532. <if test="otherName != null">`other_name` = #{otherName}, </if>
  533. <if test="bankOrder != null">`bank_order` = #{bankOrder}, </if>
  534. <if test="businessBasicOrder != null">`business_basic_order` = #{businessBasicOrder}, </if>
  535. <if test="businessBillingSource != null">`business_billing_source` = #{businessBillingSource}, </if>
  536. <if test="businessOrder != null">`business_order` = #{businessOrder}, </if>
  537. <if test="businessDescription != null">`business_description` = #{businessDescription}, </if>
  538. <if test="remark != null">`remark` = #{remark}, </if>
  539. <if test="rateRemark != null">`rate_remark` = #{rateRemark}, </if>
  540. <if test="paymentNotes != null">`payment_notes` = #{paymentNotes}, </if>
  541. <if test="createrSn != null">`creater_sn` = #{createrSn}, </if>
  542. <if test="createTime != null">`create_time` = #{createTime}, </if>
  543. <if test="moderSn != null">`moder_sn` = #{moderSn}, </if>
  544. <if test="modTime != null">`mod_time` = #{modTime}, </if>
  545. <if test="tstm != null">`tstm` = #{tstm}</if>
  546. </set>
  547. where pay_order_id = #{payOrderId}
  548. </update>
  549. <delete id="delete">
  550. delete from mall2_payment_order_data where pay_order_id = #{value}
  551. </delete>
  552. <delete id="deleteBatch">
  553. delete from mall2_payment_order_data where pay_order_id in
  554. <foreach item="payOrderId" collection="array" open="(" separator="," close=")">
  555. #{payOrderId}
  556. </foreach>
  557. </delete>
  558. </mapper>