MallPaymentOrderDataDao.xml 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863
  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. <if test="outTradeNo != null and outTradeNo != ''">
  142. AND out_trade_no = #{outTradeNo}
  143. </if>
  144. <choose>
  145. <when test="sidx != null and sidx.trim() != ''">
  146. order by ${sidx} ${order}
  147. </when>
  148. <otherwise>
  149. order by pay_order_id desc
  150. </otherwise>
  151. </choose>
  152. <if test="offset != null and limit != null">
  153. limit #{offset}, #{limit}
  154. </if>
  155. </select>
  156. <select id="queryListData" resultType="com.kmall.admin.entity.MallPaymentOrderDataEntity">
  157. select
  158. `pay_order_id`,
  159. `merchant_name`,
  160. `out_trade_no`,
  161. `pay_money`,
  162. `refund_money`,
  163. `pay_type`,
  164. `payment_type`,
  165. `transaction_order`,
  166. `time_str`,
  167. `attach`,
  168. `transaction_status`,
  169. `currency_type`,
  170. `Amount_order`,
  171. `refund_id`,
  172. `mer_refund_number`,
  173. `refund_type`,
  174. `refund_status`,
  175. `apply_refund_amount`,
  176. `cash_coupon`,
  177. `refund_rechargp_coupon`,
  178. `fee_charge`,
  179. `rate`,
  180. `pay_flag`,
  181. `serial_number`,
  182. `opposite_account`,
  183. `other_name`,
  184. `bank_order`,
  185. `business_basic_order`,
  186. `business_billing_source`,
  187. `business_order`,
  188. `business_description`,
  189. `remark`,
  190. `rate_remark`,
  191. `payment_notes`,
  192. `creater_sn`,
  193. `create_time`,
  194. `moder_sn`,
  195. `mod_time`,
  196. `tstm`
  197. from mall2_payment_order_data
  198. WHERE 1=1
  199. <if test="payFlag != null and payFlag.trim() != ''">
  200. AND pay_flag = #{payFlag}
  201. </if>
  202. <if test="startTime != null and startTime != ''">
  203. AND time_str <![CDATA[ > ]]> #{startTime}
  204. </if>
  205. <if test="endTime != null and endTime != ''">
  206. AND time_str <![CDATA[ < ]]> #{endTime}
  207. </if>
  208. </select>
  209. <select id="queryListTimeAndTnoData" resultType="com.kmall.admin.entity.MallPaymentOrderDataEntity">
  210. select
  211. `merchant_name`,
  212. `out_trade_no`,
  213. `pay_money`,
  214. `refund_money`,
  215. `pay_type`,
  216. `transaction_order`,
  217. `time_str`,
  218. `transaction_status`,
  219. `currency_type`,
  220. `Amount_order`,
  221. `apply_refund_amount`,
  222. `pay_flag`
  223. from mall2_payment_order_data
  224. WHERE 1=1
  225. <if test="outTradeNo != null and outTradeNo != ''">
  226. AND out_trade_no = #{outTradeNo}
  227. </if>
  228. <if test="timeStr != null and timeStr != ''">
  229. AND time_str = #{timeStr}
  230. </if>
  231. </select>
  232. <select id="queryListByOrderSn" resultType="com.kmall.admin.entity.MallPaymentOrderDataEntity">
  233. select
  234. `merchant_name`,
  235. `out_trade_no`,
  236. `transaction_order`,
  237. `time_str`,
  238. `pay_flag`
  239. from mall2_payment_order_data
  240. WHERE 1=1
  241. <if test="outTradeNo != null and outTradeNo != ''">
  242. AND out_trade_no in
  243. <foreach collection="list" item="outTradeNo" open="(" separator="," close=")">
  244. #{outTradeNo}
  245. </foreach>
  246. </if>
  247. </select>
  248. <select id="queryListTime" resultType="com.kmall.admin.entity.MallPaymentOrderDataEntity">
  249. select
  250. `merchant_name`,
  251. `out_trade_no`,
  252. `pay_money`,
  253. `refund_money`,
  254. `pay_type`,
  255. `transaction_order`,
  256. `time_str`,
  257. `refund_type`,
  258. `apply_refund_amount`,
  259. `pay_flag`
  260. from mall2_payment_order_data
  261. WHERE 1=1 and
  262. DATE_FORMAT(time_str,'%Y-%m-%d')= #{comparedDate}
  263. <if test="payFlag != null and payFlag.trim() != ''">
  264. AND pay_flag = #{payFlag}
  265. </if>
  266. order by time_str
  267. </select>
  268. <select id="queryTotal" resultType="int">
  269. select count(*) from mall2_payment_order_data
  270. WHERE 1=1
  271. <if test="name != null and name.trim() != ''">
  272. AND name LIKE concat('%',#{name},'%')
  273. </if>
  274. <if test="payFlag != null and payFlag.trim() != ''">
  275. AND pay_flag = #{payFlag}
  276. </if>
  277. <if test="startTime != null and startTime != ''">
  278. AND time_str <![CDATA[ > ]]> #{startTime}
  279. </if>
  280. <if test="endTime != null and endTime != ''">
  281. AND time_str <![CDATA[ < ]]> #{endTime}
  282. </if>
  283. <if test="outTradeNo != null and outTradeNo != ''">
  284. AND out_trade_no = #{outTradeNo}
  285. </if>
  286. </select>
  287. <insert id="save" parameterType="com.kmall.admin.entity.MallPaymentOrderDataEntity" useGeneratedKeys="true" keyProperty="payOrderId">
  288. insert into mall2_payment_order_data(
  289. `merchant_name`,
  290. `out_trade_no`,
  291. `pay_money`,
  292. `refund_money`,
  293. `pay_type`,
  294. `payment_type`,
  295. `transaction_order`,
  296. `time_str`,
  297. `attach`,
  298. `transaction_status`,
  299. `currency_type`,
  300. `Amount_order`,
  301. `refund_id`,
  302. `mer_refund_number`,
  303. `refund_type`,
  304. `refund_status`,
  305. `apply_refund_amount`,
  306. `cash_coupon`,
  307. `refund_rechargp_coupon`,
  308. `fee_charge`,
  309. `rate`,
  310. `pay_flag`,
  311. `serial_number`,
  312. `opposite_account`,
  313. `other_name`,
  314. `bank_order`,
  315. `business_basic_order`,
  316. `business_billing_source`,
  317. `business_order`,
  318. `business_description`,
  319. `remark`,
  320. `rate_remark`,
  321. `payment_notes`,
  322. `creater_sn`,
  323. `create_time`
  324. )
  325. values(
  326. #{merchantName},
  327. #{outTradeNo},
  328. #{payMoney},
  329. #{refundMoney},
  330. #{payType},
  331. #{paymentType},
  332. #{transactionOrder},
  333. #{timeStr},
  334. #{attach},
  335. #{transactionStatus},
  336. #{currencyType},
  337. #{amountOrder},
  338. #{refundId},
  339. #{merRefundNumber},
  340. #{refundType},
  341. #{refundStatus},
  342. #{applyRefundAmount},
  343. #{cashCoupon},
  344. #{refundRechargpCoupon},
  345. #{feeCharge},
  346. #{rate},
  347. #{payFlag},
  348. #{serialNumber},
  349. #{oppositeAccount},
  350. #{otherName},
  351. #{bankOrder},
  352. #{businessBasicOrder},
  353. #{businessBillingSource},
  354. #{businessOrder},
  355. #{businessDescription},
  356. #{remark},
  357. #{rateRemark},
  358. #{paymentNotes},
  359. #{createrSn},
  360. #{createTime}
  361. </insert>
  362. <insert id="saveBatch" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="id">
  363. <foreach collection ="list" item="item" index= "index" separator =";">
  364. insert into mall2_payment_order_data
  365. <trim prefix="(" suffix=")" suffixOverrides="," >
  366. <if test="item.merchantName != null" >
  367. `merchant_name`,
  368. </if>
  369. <if test="item.outTradeNo != null" >
  370. `out_trade_no`,
  371. </if>
  372. <if test="item.payMoney != null" >
  373. `pay_money`,
  374. </if>
  375. <if test="item.refundMoney != null" >
  376. `refund_money`,
  377. </if>
  378. <if test="item.payType != null" >
  379. `pay_type`,
  380. </if>
  381. <if test="item.paymentType != null" >
  382. `payment_type`,
  383. </if>
  384. <if test="item.transactionOrder != null" >
  385. `transaction_order`,
  386. </if>
  387. <if test="item.timeStr != null" >
  388. `time_str`,
  389. </if>
  390. <if test="item.attach != null" >
  391. `attach`,
  392. </if>
  393. <if test="item.transactionStatus != null" >
  394. `transaction_status`,
  395. </if>
  396. <if test="item.currencyType != null" >
  397. `currency_type`,
  398. </if>
  399. <if test="item.amountOrder != null" >
  400. `Amount_order`,
  401. </if>
  402. <if test="item.refundId != null" >
  403. `refund_id`,
  404. </if>
  405. <if test="item.merRefundNumber != null" >
  406. `mer_refund_number`,
  407. </if>
  408. <if test="item.refundType != null" >
  409. `refund_type`,
  410. </if>
  411. <if test="item.refundStatus != null" >
  412. `refund_status`,
  413. </if>
  414. <if test="item.applyRefundAmount != null" >
  415. `apply_refund_amount`,
  416. </if>
  417. <if test="item.cashCoupon != null" >
  418. `cash_coupon`,
  419. </if>
  420. <if test="item.refundRechargpCoupon != null" >
  421. `refund_rechargp_coupon`,
  422. </if>
  423. <if test="item.feeCharge != null" >
  424. `fee_charge`,
  425. </if>
  426. <if test="item.rate != null" >
  427. `rate`,
  428. </if>
  429. <if test="item.payFlag != null" >
  430. `pay_flag`,
  431. </if>
  432. <if test="item.serialNumber != null" >
  433. `serial_number`,
  434. </if>
  435. <if test="item.oppositeAccount != null" >
  436. `opposite_account`,
  437. </if>
  438. <if test="item.otherName != null" >
  439. `other_name`,
  440. </if>
  441. <if test="item.bankOrder != null" >
  442. `bank_order`,
  443. </if>
  444. <if test="item.businessBasicOrder != null" >
  445. `business_basic_order`,
  446. </if>
  447. <if test="item.businessBillingSource != null" >
  448. `business_billing_source`,
  449. </if>
  450. <if test="item.businessOrder != null" >
  451. `business_order`,
  452. </if>
  453. <if test="item.businessDescription != null" >
  454. `business_description`,
  455. </if>
  456. <if test="item.remark != null" >
  457. `remark`,
  458. </if>
  459. <if test="item.rateRemark != null" >
  460. `rate_remark`,
  461. </if>
  462. <if test="item.paymentNotes != null" >
  463. `payment_notes`,
  464. </if>
  465. <if test="item.createrSn != null" >
  466. `creater_sn`,
  467. </if>
  468. <if test="item.createTime != null" >
  469. `create_time`,
  470. </if>
  471. </trim>
  472. <trim prefix="values (" suffix=")" suffixOverrides="," >
  473. <if test="item.merchantName != null" >
  474. #{item.merchantName},
  475. </if>
  476. <if test="item.outTradeNo != null" >
  477. #{item.outTradeNo},
  478. </if>
  479. <if test="item.payMoney != null" >
  480. #{item.payMoney},
  481. </if>
  482. <if test="item.refundMoney != null" >
  483. #{item.refundMoney},
  484. </if>
  485. <if test="item.payType != null" >
  486. #{item.payType},
  487. </if>
  488. <if test="item.paymentType != null" >
  489. #{item.paymentType},
  490. </if>
  491. <if test="item.transactionOrder != null" >
  492. #{item.transactionOrder},
  493. </if>
  494. <if test="item.timeStr != null" >
  495. #{item.timeStr},
  496. </if>
  497. <if test="item.attach != null" >
  498. #{item.attach},
  499. </if>
  500. <if test="item.transactionStatus != null" >
  501. #{item.transactionStatus},
  502. </if>
  503. <if test="item.currencyType != null" >
  504. #{item.currencyType},
  505. </if>
  506. <if test="item.amountOrder != null" >
  507. #{item.amountOrder},
  508. </if>
  509. <if test="item.refundId != null" >
  510. #{item.refundId},
  511. </if>
  512. <if test="item.merRefundNumber != null" >
  513. #{item.merRefundNumber},
  514. </if>
  515. <if test="item.refundType != null" >
  516. #{item.refundType},
  517. </if>
  518. <if test="item.refundStatus != null" >
  519. #{item.refundStatus},
  520. </if>
  521. <if test="item.applyRefundAmount != null" >
  522. #{item.applyRefundAmount},
  523. </if>
  524. <if test="item.cashCoupon != null" >
  525. #{item.cashCoupon},
  526. </if>
  527. <if test="item.refundRechargpCoupon != null" >
  528. #{item.refundRechargpCoupon},
  529. </if>
  530. <if test="item.feeCharge != null" >
  531. #{item.feeCharge},
  532. </if>
  533. <if test="item.rate != null" >
  534. #{item.rate},
  535. </if>
  536. <if test="item.payFlag != null" >
  537. #{item.payFlag},
  538. </if>
  539. <if test="item.serialNumber != null" >
  540. #{item.serialNumber},
  541. </if>
  542. <if test="item.oppositeAccount != null" >
  543. #{item.oppositeAccount},
  544. </if>
  545. <if test="item.otherName != null" >
  546. #{item.otherName},
  547. </if>
  548. <if test="item.bankOrder != null" >
  549. #{item.bankOrder},
  550. </if>
  551. <if test="item.businessBasicOrder != null" >
  552. #{item.businessBasicOrder},
  553. </if>
  554. <if test="item.businessBillingSource != null" >
  555. #{item.businessBillingSource},
  556. </if>
  557. <if test="item.businessOrder != null" >
  558. #{item.businessOrder},
  559. </if>
  560. <if test="item.businessDescription != null" >
  561. #{item.businessDescription},
  562. </if>
  563. <if test="item.remark != null" >
  564. #{item.remark},
  565. </if>
  566. <if test="item.rateRemark != null" >
  567. #{item.rateRemark},
  568. </if>
  569. <if test="item.paymentNotes != null" >
  570. #{item.paymentNotes},
  571. </if>
  572. <if test="item.createrSn != null" >
  573. #{item.createrSn},
  574. </if>
  575. <if test="item.createTime != null" >
  576. #{item.createTime},
  577. </if>
  578. </trim>
  579. </foreach>
  580. </insert>
  581. <insert id="saveData" parameterType="com.kmall.admin.entity.MallPaymentOrderDataEntity" useGeneratedKeys="true" keyProperty="payOrderId">
  582. insert into mall2_payment_order_data
  583. <trim prefix="(" suffix=")" suffixOverrides="," >
  584. <if test="merchantName != null" >
  585. `merchant_name`,
  586. </if>
  587. <if test="outTradeNo != null" >
  588. `out_trade_no`,
  589. </if>
  590. <if test="payMoney != null" >
  591. `pay_money`,
  592. </if>
  593. <if test="refundMoney != null" >
  594. `refund_money`,
  595. </if>
  596. <if test="payType != null" >
  597. `pay_type`,
  598. </if>
  599. <if test="paymentType != null" >
  600. `payment_type`,
  601. </if>
  602. <if test="transactionOrder != null" >
  603. `transaction_order`,
  604. </if>
  605. <if test="timeStr != null" >
  606. `time_str`,
  607. </if>
  608. <if test="attach != null" >
  609. `attach`,
  610. </if>
  611. <if test="transactionStatus != null" >
  612. `transaction_status`,
  613. </if>
  614. <if test="currencyType != null" >
  615. `currency_type`,
  616. </if>
  617. <if test="amountOrder != null" >
  618. `Amount_order`,
  619. </if>
  620. <if test="refundId != null" >
  621. `refund_id`,
  622. </if>
  623. <if test="merRefundNumber != null" >
  624. `mer_refund_number`,
  625. </if>
  626. <if test="refundType != null" >
  627. `refund_type`,
  628. </if>
  629. <if test="refundStatus != null" >
  630. `refund_status`,
  631. </if>
  632. <if test="applyRefundAmount != null" >
  633. `apply_refund_amount`,
  634. </if>
  635. <if test="cashCoupon != null" >
  636. `cash_coupon`,
  637. </if>
  638. <if test="refundRechargpCoupon != null" >
  639. `refund_rechargp_coupon`,
  640. </if>
  641. <if test="feeCharge != null" >
  642. `fee_charge`,
  643. </if>
  644. <if test="rate != null" >
  645. `rate`,
  646. </if>
  647. <if test="payFlag != null" >
  648. `pay_flag`,
  649. </if>
  650. <if test="serialNumber != null" >
  651. `serial_number`,
  652. </if>
  653. <if test="oppositeAccount != null" >
  654. `opposite_account`,
  655. </if>
  656. <if test="otherName != null" >
  657. `other_name`,
  658. </if>
  659. <if test="bankOrder != null" >
  660. `bank_order`,
  661. </if>
  662. <if test="businessBasicOrder != null" >
  663. `business_basic_order`,
  664. </if>
  665. <if test="businessBillingSource != null" >
  666. `business_billing_source`,
  667. </if>
  668. <if test="businessOrder != null" >
  669. `business_order`,
  670. </if>
  671. <if test="businessDescription != null" >
  672. `business_description`,
  673. </if>
  674. <if test="remark != null" >
  675. `remark`,
  676. </if>
  677. <if test="rateRemark != null" >
  678. `rate_remark`,
  679. </if>
  680. <if test="paymentNotes != null" >
  681. `payment_notes`,
  682. </if>
  683. <if test="createrSn != null" >
  684. `creater_sn`,
  685. </if>
  686. <if test="createTime != null" >
  687. `create_time`,
  688. </if>
  689. </trim>
  690. <trim prefix="values (" suffix=")" suffixOverrides="," >
  691. <if test="merchantName != null" >
  692. #{merchantName},
  693. </if>
  694. <if test="outTradeNo != null" >
  695. #{outTradeNo},
  696. </if>
  697. <if test="payMoney != null" >
  698. #{payMoney},
  699. </if>
  700. <if test="refundMoney != null" >
  701. #{refundMoney},
  702. </if>
  703. <if test="payType != null" >
  704. #{payType},
  705. </if>
  706. <if test="paymentType != null" >
  707. #{paymentType},
  708. </if>
  709. <if test="transactionOrder != null" >
  710. #{transactionOrder},
  711. </if>
  712. <if test="timeStr != null" >
  713. #{timeStr},
  714. </if>
  715. <if test="attach != null" >
  716. #{attach},
  717. </if>
  718. <if test="transactionStatus != null" >
  719. #{transactionStatus},
  720. </if>
  721. <if test="currencyType != null" >
  722. #{currencyType},
  723. </if>
  724. <if test="amountOrder != null" >
  725. #{amountOrder},
  726. </if>
  727. <if test="refundId != null" >
  728. #{refundId},
  729. </if>
  730. <if test="merRefundNumber != null" >
  731. #{merRefundNumber},
  732. </if>
  733. <if test="refundType != null" >
  734. #{refundType},
  735. </if>
  736. <if test="refundStatus != null" >
  737. #{refundStatus},
  738. </if>
  739. <if test="applyRefundAmount != null" >
  740. #{applyRefundAmount},
  741. </if>
  742. <if test="cashCoupon != null" >
  743. #{cashCoupon},
  744. </if>
  745. <if test="refundRechargpCoupon != null" >
  746. #{refundRechargpCoupon},
  747. </if>
  748. <if test="feeCharge != null" >
  749. #{feeCharge},
  750. </if>
  751. <if test="rate != null" >
  752. #{rate},
  753. </if>
  754. <if test="payFlag != null" >
  755. #{payFlag},
  756. </if>
  757. <if test="serialNumber != null" >
  758. #{serialNumber},
  759. </if>
  760. <if test="oppositeAccount != null" >
  761. #{oppositeAccount},
  762. </if>
  763. <if test="otherName != null" >
  764. #{otherName},
  765. </if>
  766. <if test="bankOrder != null" >
  767. #{bankOrder},
  768. </if>
  769. <if test="businessBasicOrder != null" >
  770. #{businessBasicOrder},
  771. </if>
  772. <if test="businessBillingSource != null" >
  773. #{businessBillingSource},
  774. </if>
  775. <if test="businessOrder != null" >
  776. #{businessOrder},
  777. </if>
  778. <if test="businessDescription != null" >
  779. #{businessDescription},
  780. </if>
  781. <if test="remark != null" >
  782. #{remark},
  783. </if>
  784. <if test="rateRemark != null" >
  785. #{rateRemark},
  786. </if>
  787. <if test="paymentNotes != null" >
  788. #{paymentNotes},
  789. </if>
  790. <if test="createrSn != null" >
  791. #{createrSn},
  792. </if>
  793. <if test="createTime != null" >
  794. #{createTime},
  795. </if>
  796. </trim>
  797. </insert>
  798. <update id="update" parameterType="com.kmall.admin.entity.MallPaymentOrderDataEntity">
  799. update mall2_payment_order_data
  800. <set>
  801. <if test="merchantName != null">`merchant_name` = #{merchantName}, </if>
  802. <if test="outTradeNo != null">`out_trade_no` = #{outTradeNo}, </if>
  803. <if test="payMoney != null">`pay_money` = #{payMoney}, </if>
  804. <if test="refundMoney != null">`refund_money` = #{refundMoney}, </if>
  805. <if test="payType != null">`pay_type` = #{payType}, </if>
  806. <if test="paymentType != null">`payment_type` = #{paymentType}, </if>
  807. <if test="transactionOrder != null">`transaction_order` = #{transactionOrder}, </if>
  808. <if test="timeStr != null">`time_str` = #{timeStr}, </if>
  809. <if test="attach != null">`attach` = #{attach}, </if>
  810. <if test="transactionStatus != null">`transaction_status` = #{transactionStatus}, </if>
  811. <if test="currencyType != null">`currency_type` = #{currencyType}, </if>
  812. <if test="amountOrder != null">`Amount_order` = #{amountOrder}, </if>
  813. <if test="refundId != null">`refund_id` = #{refundId}, </if>
  814. <if test="merRefundNumber != null">`mer_refund_number` = #{merRefundNumber}, </if>
  815. <if test="refundType != null">`refund_type` = #{refundType}, </if>
  816. <if test="refundStatus != null">`refund_status` = #{refundStatus}, </if>
  817. <if test="applyRefundAmount != null">`apply_refund_amount` = #{applyRefundAmount}, </if>
  818. <if test="cashCoupon != null">`cash_coupon` = #{cashCoupon}, </if>
  819. <if test="refundRechargpCoupon != null">`refund_rechargp_coupon` = #{refundRechargpCoupon}, </if>
  820. <if test="feeCharge != null">`fee_charge` = #{feeCharge}, </if>
  821. <if test="rate != null">`rate` = #{rate}, </if>
  822. <if test="payFlag != null">`pay_flag` = #{payFlag}, </if>
  823. <if test="serialNumber != null">`serial_number` = #{serialNumber}, </if>
  824. <if test="oppositeAccount != null">`opposite_account` = #{oppositeAccount}, </if>
  825. <if test="otherName != null">`other_name` = #{otherName}, </if>
  826. <if test="bankOrder != null">`bank_order` = #{bankOrder}, </if>
  827. <if test="businessBasicOrder != null">`business_basic_order` = #{businessBasicOrder}, </if>
  828. <if test="businessBillingSource != null">`business_billing_source` = #{businessBillingSource}, </if>
  829. <if test="businessOrder != null">`business_order` = #{businessOrder}, </if>
  830. <if test="businessDescription != null">`business_description` = #{businessDescription}, </if>
  831. <if test="remark != null">`remark` = #{remark}, </if>
  832. <if test="rateRemark != null">`rate_remark` = #{rateRemark}, </if>
  833. <if test="paymentNotes != null">`payment_notes` = #{paymentNotes}, </if>
  834. <if test="createrSn != null">`creater_sn` = #{createrSn}, </if>
  835. <if test="createTime != null">`create_time` = #{createTime}, </if>
  836. <if test="moderSn != null">`moder_sn` = #{moderSn}, </if>
  837. <if test="modTime != null">`mod_time` = #{modTime}, </if>
  838. <if test="tstm != null">`tstm` = #{tstm}</if>
  839. </set>
  840. where pay_order_id = #{payOrderId}
  841. </update>
  842. <delete id="delete">
  843. delete from mall2_payment_order_data where pay_order_id = #{value}
  844. </delete>
  845. <delete id="deleteBatch">
  846. delete from mall2_payment_order_data where pay_order_id in
  847. <foreach item="payOrderId" collection="array" open="(" separator="," close=")">
  848. #{payOrderId}
  849. </foreach>
  850. </delete>
  851. </mapper>