1
0

WxCbPayDocMapper.xml 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552
  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.emato.cuspay.dao.mapper.wx.WxCbPayDocMapper" >
  4. <resultMap id="BaseResultMap" type="com.emato.cuspay.dto.wx.WxCbPayDoc" >
  5. <id column="wx_pay_sn" property="wxPaySn" jdbcType="VARCHAR" />
  6. <result column="merch_sn" property="merchSn" jdbcType="VARCHAR" />
  7. <result column="merch_name" property="merchName" jdbcType="VARCHAR" />
  8. <result column="plat_sn" property="platSn" jdbcType="VARCHAR" />
  9. <result column="plat_name" property="platName" jdbcType="VARCHAR" />
  10. <result column="third_party_merch_code" property="thirdPartyMerchCode" jdbcType="VARCHAR" />
  11. <result column="third_party_merch_name" property="thirdPartyMerchName" jdbcType="VARCHAR" />
  12. <result column="appid" property="appid" jdbcType="VARCHAR" />
  13. <result column="mch_id" property="mchId" jdbcType="VARCHAR" />
  14. <result column="out_trade_no" property="outTradeNo" jdbcType="VARCHAR" />
  15. <result column="transaction_id" property="transactionId" jdbcType="VARCHAR" />
  16. <result column="customs" property="customs" jdbcType="VARCHAR" />
  17. <result column="mch_customs_no" property="mchCustomsNo" jdbcType="VARCHAR" />
  18. <result column="duty" property="duty" jdbcType="INTEGER" />
  19. <result column="action_type" property="actionType" jdbcType="VARCHAR" />
  20. <result column="sub_order_no" property="subOrderNo" jdbcType="VARCHAR" />
  21. <result column="fee_type" property="feeType" jdbcType="VARCHAR" />
  22. <result column="order_fee" property="orderFee" jdbcType="INTEGER" />
  23. <result column="transport_fee" property="transportFee" jdbcType="INTEGER" />
  24. <result column="product_fee" property="productFee" jdbcType="INTEGER" />
  25. <result column="cert_type" property="certType" jdbcType="VARCHAR" />
  26. <result column="cert_id" property="certId" jdbcType="VARCHAR" />
  27. <result column="name" property="name" jdbcType="VARCHAR" />
  28. <result column="doc_status" property="docStatus" jdbcType="CHAR" />
  29. <result column="remark" property="remark" jdbcType="VARCHAR" />
  30. <result column="return_code" property="returnCode" jdbcType="VARCHAR" />
  31. <result column="return_msg" property="returnMsg" jdbcType="VARCHAR" />
  32. <result column="result_code" property="resultCode" jdbcType="VARCHAR" />
  33. <result column="err_code" property="errCode" jdbcType="VARCHAR" />
  34. <result column="err_code_des" property="errCodeDes" jdbcType="VARCHAR" />
  35. <result column="creater_sn" property="createrSn" jdbcType="VARCHAR" />
  36. <result column="create_time" property="createTime" jdbcType="VARCHAR" />
  37. <result column="moder_sn" property="moderSn" jdbcType="VARCHAR" />
  38. <result column="mod_time" property="modTime" jdbcType="VARCHAR" />
  39. <result column="tstm" property="tstm" jdbcType="TIMESTAMP" />
  40. <result column="ex_field" property="exField" jdbcType="VARCHAR" />
  41. <result column="ex_field2" property="exField2" jdbcType="VARCHAR" />
  42. <result column="ex_field3" property="exField3" jdbcType="VARCHAR" />
  43. <result column="ex_field4" property="exField4" jdbcType="VARCHAR" />
  44. <result column="ex_field5" property="exField5" jdbcType="VARCHAR" />
  45. <result column="plat_no" property="platNo" jdbcType="VARCHAR" />
  46. </resultMap>
  47. <sql id="Base_Column_List" >
  48. wx_pay_sn, merch_sn, merch_name, plat_no, plat_sn, plat_name, third_party_merch_code, third_party_merch_name,
  49. appid, mch_id, out_trade_no, transaction_id, customs, mch_customs_no, duty, action_type,
  50. sub_order_no, fee_type, order_fee, transport_fee, product_fee, cert_type, cert_id,
  51. name, doc_status, remark, return_code, return_msg, result_code, err_code, err_code_des,
  52. creater_sn, create_time, moder_sn, mod_time, tstm, ex_field, ex_field2, ex_field3,
  53. ex_field4, ex_field5
  54. </sql>
  55. <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
  56. select
  57. <include refid="Base_Column_List" />
  58. from wx_cb_pay_doc
  59. where wx_pay_sn = #{wxPaySn,jdbcType=VARCHAR}
  60. </select>
  61. <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
  62. delete from wx_cb_pay_doc
  63. where wx_pay_sn = #{wxPaySn,jdbcType=VARCHAR}
  64. </delete>
  65. <insert id="insertSelective" parameterType="com.emato.cuspay.dto.wx.WxCbPayDoc" >
  66. insert into wx_cb_pay_doc
  67. <trim prefix="(" suffix=")" suffixOverrides="," >
  68. <if test="wxPaySn != null" >
  69. wx_pay_sn,
  70. </if>
  71. <if test="merchSn != null" >
  72. merch_sn,
  73. </if>
  74. <if test="merchName != null" >
  75. merch_name,
  76. </if>
  77. <if test="platNo != null" >
  78. plat_no,
  79. </if>
  80. <if test="platSn != null" >
  81. plat_sn,
  82. </if>
  83. <if test="platName != null" >
  84. plat_name,
  85. </if>
  86. <if test="thirdPartyMerchCode != null" >
  87. third_party_merch_code,
  88. </if>
  89. <if test="thirdPartyMerchName != null" >
  90. third_party_merch_name,
  91. </if>
  92. <if test="appid != null" >
  93. appid,
  94. </if>
  95. <if test="mchId != null" >
  96. mch_id,
  97. </if>
  98. <if test="outTradeNo != null" >
  99. out_trade_no,
  100. </if>
  101. <if test="transactionId != null" >
  102. transaction_id,
  103. </if>
  104. <if test="customs != null" >
  105. customs,
  106. </if>
  107. <if test="mchCustomsNo != null" >
  108. mch_customs_no,
  109. </if>
  110. <if test="duty != null" >
  111. duty,
  112. </if>
  113. <if test="actionType != null" >
  114. action_type,
  115. </if>
  116. <if test="subOrderNo != null" >
  117. sub_order_no,
  118. </if>
  119. <if test="feeType != null" >
  120. fee_type,
  121. </if>
  122. <if test="orderFee != null" >
  123. order_fee,
  124. </if>
  125. <if test="transportFee != null" >
  126. transport_fee,
  127. </if>
  128. <if test="productFee != null" >
  129. product_fee,
  130. </if>
  131. <if test="certType != null" >
  132. cert_type,
  133. </if>
  134. <if test="certId != null" >
  135. cert_id,
  136. </if>
  137. <if test="name != null" >
  138. name,
  139. </if>
  140. <if test="docStatus != null" >
  141. doc_status,
  142. </if>
  143. <if test="remark != null" >
  144. remark,
  145. </if>
  146. <if test="returnCode != null" >
  147. return_code,
  148. </if>
  149. <if test="returnMsg != null" >
  150. return_msg,
  151. </if>
  152. <if test="resultCode != null" >
  153. result_code,
  154. </if>
  155. <if test="errCode != null" >
  156. err_code,
  157. </if>
  158. <if test="errCodeDes != null" >
  159. err_code_des,
  160. </if>
  161. <if test="createrSn != null" >
  162. creater_sn,
  163. </if>
  164. <if test="createTime != null" >
  165. create_time,
  166. </if>
  167. <if test="moderSn != null" >
  168. moder_sn,
  169. </if>
  170. <if test="modTime != null" >
  171. mod_time,
  172. </if>
  173. <if test="tstm != null" >
  174. tstm,
  175. </if>
  176. <if test="exField != null" >
  177. ex_field,
  178. </if>
  179. <if test="exField2 != null" >
  180. ex_field2,
  181. </if>
  182. <if test="exField3 != null" >
  183. ex_field3,
  184. </if>
  185. <if test="exField4 != null" >
  186. ex_field4,
  187. </if>
  188. <if test="exField5 != null" >
  189. ex_field5,
  190. </if>
  191. </trim>
  192. <trim prefix="values (" suffix=")" suffixOverrides="," >
  193. <if test="wxPaySn != null" >
  194. #{wxPaySn,jdbcType=VARCHAR},
  195. </if>
  196. <if test="merchSn != null" >
  197. #{merchSn,jdbcType=VARCHAR},
  198. </if>
  199. <if test="merchName != null" >
  200. #{merchName,jdbcType=VARCHAR},
  201. </if>
  202. <if test="platNo != null" >
  203. #{platNo,jdbcType=VARCHAR},
  204. </if>
  205. <if test="platSn != null" >
  206. #{platSn,jdbcType=VARCHAR},
  207. </if>
  208. <if test="platName != null" >
  209. #{platName,jdbcType=VARCHAR},
  210. </if>
  211. <if test="thirdPartyMerchCode != null" >
  212. #{thirdPartyMerchCode,jdbcType=VARCHAR},
  213. </if>
  214. <if test="thirdPartyMerchName != null" >
  215. #{thirdPartyMerchName,jdbcType=VARCHAR},
  216. </if>
  217. <if test="appid != null" >
  218. #{appid,jdbcType=VARCHAR},
  219. </if>
  220. <if test="mchId != null" >
  221. #{mchId,jdbcType=VARCHAR},
  222. </if>
  223. <if test="outTradeNo != null" >
  224. #{outTradeNo,jdbcType=VARCHAR},
  225. </if>
  226. <if test="transactionId != null" >
  227. #{transactionId,jdbcType=VARCHAR},
  228. </if>
  229. <if test="customs != null" >
  230. #{customs,jdbcType=VARCHAR},
  231. </if>
  232. <if test="mchCustomsNo != null" >
  233. #{mchCustomsNo,jdbcType=VARCHAR},
  234. </if>
  235. <if test="duty != null" >
  236. #{duty,jdbcType=INTEGER},
  237. </if>
  238. <if test="actionType != null" >
  239. #{actionType,jdbcType=VARCHAR},
  240. </if>
  241. <if test="subOrderNo != null" >
  242. #{subOrderNo,jdbcType=VARCHAR},
  243. </if>
  244. <if test="feeType != null" >
  245. #{feeType,jdbcType=VARCHAR},
  246. </if>
  247. <if test="orderFee != null" >
  248. #{orderFee,jdbcType=INTEGER},
  249. </if>
  250. <if test="transportFee != null" >
  251. #{transportFee,jdbcType=INTEGER},
  252. </if>
  253. <if test="productFee != null" >
  254. #{productFee,jdbcType=INTEGER},
  255. </if>
  256. <if test="certType != null" >
  257. #{certType,jdbcType=VARCHAR},
  258. </if>
  259. <if test="certId != null" >
  260. #{certId,jdbcType=VARCHAR},
  261. </if>
  262. <if test="name != null" >
  263. #{name,jdbcType=VARCHAR},
  264. </if>
  265. <if test="docStatus != null" >
  266. #{docStatus,jdbcType=CHAR},
  267. </if>
  268. <if test="remark != null" >
  269. #{remark,jdbcType=VARCHAR},
  270. </if>
  271. <if test="returnCode != null" >
  272. #{returnCode,jdbcType=VARCHAR},
  273. </if>
  274. <if test="returnMsg != null" >
  275. #{returnMsg,jdbcType=VARCHAR},
  276. </if>
  277. <if test="resultCode != null" >
  278. #{resultCode,jdbcType=VARCHAR},
  279. </if>
  280. <if test="errCode != null" >
  281. #{errCode,jdbcType=VARCHAR},
  282. </if>
  283. <if test="errCodeDes != null" >
  284. #{errCodeDes,jdbcType=VARCHAR},
  285. </if>
  286. <if test="createrSn != null" >
  287. #{createrSn,jdbcType=VARCHAR},
  288. </if>
  289. <if test="createTime != null" >
  290. #{createTime,jdbcType=VARCHAR},
  291. </if>
  292. <if test="moderSn != null" >
  293. #{moderSn,jdbcType=VARCHAR},
  294. </if>
  295. <if test="modTime != null" >
  296. #{modTime,jdbcType=VARCHAR},
  297. </if>
  298. <if test="tstm != null" >
  299. #{tstm,jdbcType=TIMESTAMP},
  300. </if>
  301. <if test="exField != null" >
  302. #{exField,jdbcType=VARCHAR},
  303. </if>
  304. <if test="exField2 != null" >
  305. #{exField2,jdbcType=VARCHAR},
  306. </if>
  307. <if test="exField3 != null" >
  308. #{exField3,jdbcType=VARCHAR},
  309. </if>
  310. <if test="exField4 != null" >
  311. #{exField4,jdbcType=VARCHAR},
  312. </if>
  313. <if test="exField5 != null" >
  314. #{exField5,jdbcType=VARCHAR},
  315. </if>
  316. </trim>
  317. </insert>
  318. <update id="updateByPrimaryKeySelective" parameterType="com.emato.cuspay.dto.wx.WxCbPayDoc" >
  319. update wx_cb_pay_doc
  320. <set >
  321. <if test="merchSn != null" >
  322. merch_sn = #{merchSn,jdbcType=VARCHAR},
  323. </if>
  324. <if test="merchName != null" >
  325. merch_name = #{merchName,jdbcType=VARCHAR},
  326. </if>
  327. <if test="platNo != null" >
  328. plat_no = #{platNo,jdbcType=VARCHAR},
  329. </if>
  330. <if test="platSn != null" >
  331. plat_sn = #{platSn,jdbcType=VARCHAR},
  332. </if>
  333. <if test="platName != null" >
  334. plat_name = #{platName,jdbcType=VARCHAR},
  335. </if>
  336. <if test="thirdPartyMerchCode != null" >
  337. third_party_merch_code = #{thirdPartyMerchCode,jdbcType=VARCHAR},
  338. </if>
  339. <if test="thirdPartyMerchName != null" >
  340. third_party_merch_name = #{thirdPartyMerchName,jdbcType=VARCHAR},
  341. </if>
  342. <if test="appid != null" >
  343. appid = #{appid,jdbcType=VARCHAR},
  344. </if>
  345. <if test="mchId != null" >
  346. mch_id = #{mchId,jdbcType=VARCHAR},
  347. </if>
  348. <if test="outTradeNo != null" >
  349. out_trade_no = #{outTradeNo,jdbcType=VARCHAR},
  350. </if>
  351. <if test="transactionId != null" >
  352. transaction_id = #{transactionId,jdbcType=VARCHAR},
  353. </if>
  354. <if test="customs != null" >
  355. customs = #{customs,jdbcType=VARCHAR},
  356. </if>
  357. <if test="mchCustomsNo != null" >
  358. mch_customs_no = #{mchCustomsNo,jdbcType=VARCHAR},
  359. </if>
  360. <if test="duty != null" >
  361. duty = #{duty,jdbcType=INTEGER},
  362. </if>
  363. <if test="actionType != null" >
  364. action_type = #{actionType,jdbcType=VARCHAR},
  365. </if>
  366. <if test="subOrderNo != null" >
  367. sub_order_no = #{subOrderNo,jdbcType=VARCHAR},
  368. </if>
  369. <if test="feeType != null" >
  370. fee_type = #{feeType,jdbcType=VARCHAR},
  371. </if>
  372. <if test="orderFee != null" >
  373. order_fee = #{orderFee,jdbcType=INTEGER},
  374. </if>
  375. <if test="transportFee != null" >
  376. transport_fee = #{transportFee,jdbcType=INTEGER},
  377. </if>
  378. <if test="productFee != null" >
  379. product_fee = #{productFee,jdbcType=INTEGER},
  380. </if>
  381. <if test="certType != null" >
  382. cert_type = #{certType,jdbcType=VARCHAR},
  383. </if>
  384. <if test="certId != null" >
  385. cert_id = #{certId,jdbcType=VARCHAR},
  386. </if>
  387. <if test="name != null" >
  388. name = #{name,jdbcType=VARCHAR},
  389. </if>
  390. <if test="docStatus != null" >
  391. doc_status = #{docStatus,jdbcType=CHAR},
  392. </if>
  393. <if test="remark != null" >
  394. remark = #{remark,jdbcType=VARCHAR},
  395. </if>
  396. <if test="returnCode != null" >
  397. return_code = #{returnCode,jdbcType=VARCHAR},
  398. </if>
  399. <if test="returnMsg != null" >
  400. return_msg = #{returnMsg,jdbcType=VARCHAR},
  401. </if>
  402. <if test="resultCode != null" >
  403. result_code = #{resultCode,jdbcType=VARCHAR},
  404. </if>
  405. <if test="errCode != null" >
  406. err_code = #{errCode,jdbcType=VARCHAR},
  407. </if>
  408. <if test="errCodeDes != null" >
  409. err_code_des = #{errCodeDes,jdbcType=VARCHAR},
  410. </if>
  411. <if test="createrSn != null" >
  412. creater_sn = #{createrSn,jdbcType=VARCHAR},
  413. </if>
  414. <if test="createTime != null" >
  415. create_time = #{createTime,jdbcType=VARCHAR},
  416. </if>
  417. <if test="moderSn != null" >
  418. moder_sn = #{moderSn,jdbcType=VARCHAR},
  419. </if>
  420. <if test="modTime != null" >
  421. mod_time = #{modTime,jdbcType=VARCHAR},
  422. </if>
  423. <if test="tstm != null" >
  424. tstm = #{tstm,jdbcType=TIMESTAMP},
  425. </if>
  426. <if test="exField != null" >
  427. ex_field = #{exField,jdbcType=VARCHAR},
  428. </if>
  429. <if test="exField2 != null" >
  430. ex_field2 = #{exField2,jdbcType=VARCHAR},
  431. </if>
  432. <if test="exField3 != null" >
  433. ex_field3 = #{exField3,jdbcType=VARCHAR},
  434. </if>
  435. <if test="exField4 != null" >
  436. ex_field4 = #{exField4,jdbcType=VARCHAR},
  437. </if>
  438. <if test="exField5 != null" >
  439. ex_field5 = #{exField5,jdbcType=VARCHAR},
  440. </if>
  441. </set>
  442. where wx_pay_sn = #{wxPaySn,jdbcType=VARCHAR}
  443. </update>
  444. <select id="selectBeDeclaredData" resultMap="BaseResultMap" parameterType="java.lang.Integer">
  445. select
  446. <include refid="Base_Column_List" />
  447. from wx_cb_pay_doc
  448. where doc_status = '00' limit #{limit}
  449. </select>
  450. <select id="selectNotify" resultMap="BaseResultMap" parameterType="java.lang.Integer">
  451. SELECT
  452. <include refid="Base_Column_List"/>
  453. FROM wx_cb_pay_doc WHERE doc_status != '00' AND notify_merch = 'Y' limit #{limit}
  454. </select>
  455. <select id="insertBatch">
  456. INSERT wx_cb_pay_doc
  457. <trim prefix="(" suffix=")" suffixOverrides=",">
  458. wx_pay_sn,
  459. merch_sn,
  460. merch_name,
  461. plat_no,
  462. plat_sn,
  463. plat_name,
  464. third_party_merch_code,
  465. third_party_merch_name,
  466. appid,
  467. mch_id,
  468. out_trade_no,
  469. transaction_id,
  470. customs,
  471. mch_customs_no,
  472. duty,
  473. action_type,
  474. sub_order_no,
  475. fee_type,
  476. order_fee,
  477. transport_fee,
  478. product_fee,
  479. cert_type,
  480. cert_id,
  481. name,
  482. doc_status,
  483. remark,
  484. return_code,
  485. return_msg,
  486. result_code,
  487. err_code,
  488. err_code_des,
  489. creater_sn,
  490. create_time,
  491. moder_sn,
  492. mod_time,
  493. ex_field,
  494. ex_field2,
  495. ex_field3,
  496. ex_field4,
  497. ex_field5,
  498. </trim>
  499. VALUES
  500. <foreach collection="list" item="item" index="index" separator=",">
  501. <trim prefix="(" suffix=")" suffixOverrides=",">
  502. #{wxPaySn,jdbcType=VARCHAR},
  503. #{merchSn,jdbcType=VARCHAR},
  504. #{merchName,jdbcType=VARCHAR},
  505. #{platNo,jdbcType=VARCHAR}
  506. #{platSn,jdbcType=VARCHAR},
  507. #{platName,jdbcType=VARCHAR},
  508. #{thirdPartyMerchCode,jdbcType=VARCHAR},
  509. #{thirdPartyMerchName,jdbcType=VARCHAR},
  510. #{appid,jdbcType=VARCHAR},
  511. #{mchId,jdbcType=VARCHAR},
  512. #{outTradeNo,jdbcType=VARCHAR},
  513. #{transactionId,jdbcType=VARCHAR},
  514. #{customs,jdbcType=VARCHAR},
  515. #{mchCustomsNo,jdbcType=VARCHAR},
  516. #{duty,jdbcType=INTEGER},
  517. #{actionType,jdbcType=VARCHAR},
  518. #{subOrderNo,jdbcType=VARCHAR},
  519. #{feeType,jdbcType=VARCHAR},
  520. #{orderFee,jdbcType=INTEGER},
  521. #{transportFee,jdbcType=INTEGER},
  522. #{productFee,jdbcType=INTEGER},
  523. #{certType,jdbcType=VARCHAR},
  524. #{certId,jdbcType=VARCHAR},
  525. #{name,jdbcType=VARCHAR},
  526. #{docStatus,jdbcType=CHAR},
  527. #{remark,jdbcType=VARCHAR},
  528. #{returnCode,jdbcType=VARCHAR},
  529. #{returnMsg,jdbcType=VARCHAR},
  530. #{resultCode,jdbcType=VARCHAR},
  531. #{errCode,jdbcType=VARCHAR},
  532. #{errCodeDes,jdbcType=VARCHAR},
  533. #{createrSn,jdbcType=VARCHAR},
  534. #{createTime,jdbcType=VARCHAR},
  535. #{moderSn,jdbcType=VARCHAR},
  536. #{modTime,jdbcType=VARCHAR},
  537. #{exField,jdbcType=VARCHAR},
  538. #{exField2,jdbcType=VARCHAR},
  539. #{exField3,jdbcType=VARCHAR},
  540. #{exField4,jdbcType=VARCHAR},
  541. #{exField5,jdbcType=VARCHAR},
  542. </trim>
  543. </foreach>
  544. </select>
  545. </mapper>