MerchNotiMapper.xml 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496
  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.merch.MerchNotiMapper" >
  4. <resultMap id="BaseResultMap" type="com.emato.cuspay.entity.merch.MerchNoti" >
  5. <id column="noti_sn" property="notiSn" jdbcType="VARCHAR" />
  6. <result column="all_pay_sn" property="allPaySn" jdbcType="VARCHAR" />
  7. <result column="merch_sn" property="merchSn" jdbcType="VARCHAR" />
  8. <result column="merch_name" property="merchName" jdbcType="VARCHAR" />
  9. <result column="merch_erp_order_sn" property="merchErpOrderSn" jdbcType="VARCHAR" />
  10. <result column="plat_sn" property="platSn" jdbcType="VARCHAR" />
  11. <result column="plat_name" property="platName" jdbcType="VARCHAR" />
  12. <result column="third_party_merch_code" property="thirdPartyMerchCode" jdbcType="VARCHAR" />
  13. <result column="third_party_merch_name" property="thirdPartyMerchName" jdbcType="VARCHAR" />
  14. <result column="all_merch_id" property="allMerchId" jdbcType="VARCHAR" />
  15. <result column="all_order_no" property="allOrderNo" jdbcType="VARCHAR" />
  16. <result column="all_pay_no" property="allPayNo" jdbcType="VARCHAR" />
  17. <result column="all_sub_order_no" property="allSubOrderNo" jdbcType="VARCHAR" />
  18. <result column="all_sub_order_id" property="allSubOrderId" jdbcType="VARCHAR" />
  19. <result column="pay_chnl_flag" property="payChnlFlag" jdbcType="VARCHAR" />
  20. <result column="buyer_payer_check" property="buyerPayerCheck" jdbcType="CHAR" />
  21. <result column="noti_count" property="notiCount" jdbcType="INTEGER" />
  22. <result column="is_stoped" property="isStoped" jdbcType="CHAR" />
  23. <result column="cus_decl_status" property="cusDeclStatus" jdbcType="CHAR" />
  24. <result column="noti_statue" property="notiStatue" jdbcType="CHAR" />
  25. <result column="code" property="code" jdbcType="VARCHAR" />
  26. <result column="msg" property="msg" jdbcType="VARCHAR" />
  27. <result column="notify_url" property="notifyUrl" jdbcType="VARCHAR" />
  28. <result column="remark" property="remark" jdbcType="VARCHAR" />
  29. <result column="creater_sn" property="createrSn" jdbcType="VARCHAR" />
  30. <result column="create_time" property="createTime" jdbcType="VARCHAR" />
  31. <result column="moder_sn" property="moderSn" jdbcType="VARCHAR" />
  32. <result column="mod_time" property="modTime" jdbcType="VARCHAR" />
  33. <result column="tstm" property="tstm" jdbcType="TIMESTAMP" />
  34. </resultMap>
  35. <sql id="Base_Column_List" >
  36. noti_sn, all_pay_sn, merch_sn, merch_name, merch_erp_order_sn, plat_sn, plat_name,
  37. third_party_merch_code, third_party_merch_name, all_merch_id, all_order_no, all_pay_no,
  38. all_sub_order_no, all_sub_order_id, pay_chnl_flag, buyer_payer_check, noti_count, is_stoped, cus_decl_status,
  39. noti_statue, code, msg, notify_url, remark, creater_sn, create_time, moder_sn, mod_time,
  40. tstm
  41. </sql>
  42. <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
  43. select
  44. <include refid="Base_Column_List" />
  45. from merch_noti
  46. where noti_sn = #{notiSn,jdbcType=VARCHAR}
  47. </select>
  48. <select id="getMerchNotiByCodeAndOrderNo" resultMap="BaseResultMap" parameterType="com.emato.cuspay.entity.merch.MerchNoti" >
  49. select
  50. <include refid="Base_Column_List" />
  51. from merch_noti
  52. where code = #{code,jdbcType=VARCHAR} and all_pay_no = #{allPayNo,jdbcType=VARCHAR} and cus_decl_status = #{cusDeclStatus,jdbcType=VARCHAR}
  53. </select>
  54. <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
  55. delete from merch_noti
  56. where noti_sn = #{notiSn,jdbcType=VARCHAR}
  57. </delete>
  58. <insert id="insertSelective" parameterType="com.emato.cuspay.entity.merch.MerchNoti" >
  59. insert into merch_noti
  60. <trim prefix="(" suffix=")" suffixOverrides="," >
  61. <if test="notiSn != null" >
  62. noti_sn,
  63. </if>
  64. <if test="allPaySn != null" >
  65. all_pay_sn,
  66. </if>
  67. <if test="merchSn != null" >
  68. merch_sn,
  69. </if>
  70. <if test="merchName != null" >
  71. merch_name,
  72. </if>
  73. <if test="merchErpOrderSn != null" >
  74. merch_erp_order_sn,
  75. </if>
  76. <if test="platSn != null" >
  77. plat_sn,
  78. </if>
  79. <if test="platName != null" >
  80. plat_name,
  81. </if>
  82. <if test="thirdPartyMerchCode != null" >
  83. third_party_merch_code,
  84. </if>
  85. <if test="thirdPartyMerchName != null" >
  86. third_party_merch_name,
  87. </if>
  88. <if test="allMerchId != null" >
  89. all_merch_id,
  90. </if>
  91. <if test="allOrderNo != null" >
  92. all_order_no,
  93. </if>
  94. <if test="allPayNo != null" >
  95. all_pay_no,
  96. </if>
  97. <if test="allSubOrderNo != null" >
  98. all_sub_order_no,
  99. </if>
  100. <if test="allSubOrderId != null" >
  101. all_sub_order_id,
  102. </if>
  103. <if test="payChnlFlag != null" >
  104. pay_chnl_flag,
  105. </if>
  106. <if test="buyerPayerCheck != null" >
  107. buyer_payer_check,
  108. </if>
  109. <if test="notiCount != null" >
  110. noti_count,
  111. </if>
  112. <if test="isStoped != null" >
  113. is_stoped,
  114. </if>
  115. <if test="cusDeclStatus != null" >
  116. cus_decl_status,
  117. </if>
  118. <if test="notiStatue != null" >
  119. noti_statue,
  120. </if>
  121. <if test="code != null" >
  122. code,
  123. </if>
  124. <if test="msg != null" >
  125. msg,
  126. </if>
  127. <if test="notifyUrl != null" >
  128. notify_url,
  129. </if>
  130. <if test="remark != null" >
  131. remark,
  132. </if>
  133. <if test="createrSn != null" >
  134. creater_sn,
  135. </if>
  136. <if test="createTime != null" >
  137. create_time,
  138. </if>
  139. <if test="moderSn != null" >
  140. moder_sn,
  141. </if>
  142. <if test="modTime != null" >
  143. mod_time,
  144. </if>
  145. <if test="tstm != null" >
  146. tstm,
  147. </if>
  148. </trim>
  149. <trim prefix="values (" suffix=")" suffixOverrides="," >
  150. <if test="notiSn != null" >
  151. #{notiSn,jdbcType=VARCHAR},
  152. </if>
  153. <if test="allPaySn != null" >
  154. #{allPaySn,jdbcType=VARCHAR},
  155. </if>
  156. <if test="merchSn != null" >
  157. #{merchSn,jdbcType=VARCHAR},
  158. </if>
  159. <if test="merchName != null" >
  160. #{merchName,jdbcType=VARCHAR},
  161. </if>
  162. <if test="merchErpOrderSn != null" >
  163. #{merchErpOrderSn,jdbcType=VARCHAR},
  164. </if>
  165. <if test="platSn != null" >
  166. #{platSn,jdbcType=VARCHAR},
  167. </if>
  168. <if test="platName != null" >
  169. #{platName,jdbcType=VARCHAR},
  170. </if>
  171. <if test="thirdPartyMerchCode != null" >
  172. #{thirdPartyMerchCode,jdbcType=VARCHAR},
  173. </if>
  174. <if test="thirdPartyMerchName != null" >
  175. #{thirdPartyMerchName,jdbcType=VARCHAR},
  176. </if>
  177. <if test="allMerchId != null" >
  178. #{allMerchId,jdbcType=VARCHAR},
  179. </if>
  180. <if test="allOrderNo != null" >
  181. #{allOrderNo,jdbcType=VARCHAR},
  182. </if>
  183. <if test="allPayNo != null" >
  184. #{allPayNo,jdbcType=VARCHAR},
  185. </if>
  186. <if test="allSubOrderNo != null" >
  187. #{allSubOrderNo,jdbcType=VARCHAR},
  188. </if>
  189. <if test="allSubOrderId != null" >
  190. #{allSubOrderId,jdbcType=VARCHAR},
  191. </if>
  192. <if test="payChnlFlag != null" >
  193. #{payChnlFlag,jdbcType=VARCHAR},
  194. </if>
  195. <if test="buyerPayerCheck != null" >
  196. #{buyerPayerCheck,jdbcType=CHAR},
  197. </if>
  198. <if test="notiCount != null" >
  199. #{notiCount,jdbcType=INTEGER},
  200. </if>
  201. <if test="isStoped != null" >
  202. #{isStoped,jdbcType=CHAR},
  203. </if>
  204. <if test="cusDeclStatus != null" >
  205. #{cusDeclStatus,jdbcType=CHAR},
  206. </if>
  207. <if test="notiStatue != null" >
  208. #{notiStatue,jdbcType=CHAR},
  209. </if>
  210. <if test="code != null" >
  211. #{code,jdbcType=VARCHAR},
  212. </if>
  213. <if test="msg != null" >
  214. #{msg,jdbcType=VARCHAR},
  215. </if>
  216. <if test="notifyUrl != null" >
  217. #{notifyUrl,jdbcType=VARCHAR},
  218. </if>
  219. <if test="remark != null" >
  220. #{remark,jdbcType=VARCHAR},
  221. </if>
  222. <if test="createrSn != null" >
  223. #{createrSn,jdbcType=VARCHAR},
  224. </if>
  225. <if test="createTime != null" >
  226. #{createTime,jdbcType=VARCHAR},
  227. </if>
  228. <if test="moderSn != null" >
  229. #{moderSn,jdbcType=VARCHAR},
  230. </if>
  231. <if test="modTime != null" >
  232. #{modTime,jdbcType=VARCHAR},
  233. </if>
  234. <if test="tstm != null" >
  235. #{tstm,jdbcType=TIMESTAMP},
  236. </if>
  237. </trim>
  238. </insert>
  239. <update id="updateByPrimaryKeySelective" parameterType="com.emato.cuspay.entity.merch.MerchNoti" >
  240. update merch_noti
  241. <set >
  242. <if test="allPaySn != null" >
  243. all_pay_sn = #{allPaySn,jdbcType=VARCHAR},
  244. </if>
  245. <if test="merchSn != null" >
  246. merch_sn = #{merchSn,jdbcType=VARCHAR},
  247. </if>
  248. <if test="merchName != null" >
  249. merch_name = #{merchName,jdbcType=VARCHAR},
  250. </if>
  251. <if test="merchErpOrderSn != null" >
  252. merch_erp_order_sn = #{merchErpOrderSn,jdbcType=VARCHAR},
  253. </if>
  254. <if test="platSn != null" >
  255. plat_sn = #{platSn,jdbcType=VARCHAR},
  256. </if>
  257. <if test="platName != null" >
  258. plat_name = #{platName,jdbcType=VARCHAR},
  259. </if>
  260. <if test="thirdPartyMerchCode != null" >
  261. third_party_merch_code = #{thirdPartyMerchCode,jdbcType=VARCHAR},
  262. </if>
  263. <if test="thirdPartyMerchName != null" >
  264. third_party_merch_name = #{thirdPartyMerchName,jdbcType=VARCHAR},
  265. </if>
  266. <if test="allMerchId != null" >
  267. all_merch_id = #{allMerchId,jdbcType=VARCHAR},
  268. </if>
  269. <if test="allOrderNo != null" >
  270. all_order_no = #{allOrderNo,jdbcType=VARCHAR},
  271. </if>
  272. <if test="allPayNo != null" >
  273. all_pay_no = #{allPayNo,jdbcType=VARCHAR},
  274. </if>
  275. <if test="allSubOrderNo != null" >
  276. all_sub_order_no = #{allSubOrderNo,jdbcType=VARCHAR},
  277. </if>
  278. <if test="allSubOrderId != null" >
  279. all_sub_order_id = #{allSubOrderId,jdbcType=VARCHAR},
  280. </if>
  281. <if test="payChnlFlag != null" >
  282. pay_chnl_flag = #{payChnlFlag,jdbcType=VARCHAR},
  283. </if>
  284. <if test="buyerPayerCheck != null" >
  285. buyer_payer_check = #{buyerPayerCheck,jdbcType=CHAR},
  286. </if>
  287. <if test="notiCount != null" >
  288. noti_count = #{notiCount,jdbcType=INTEGER},
  289. </if>
  290. <if test="isStoped != null" >
  291. is_stoped = #{isStoped,jdbcType=CHAR},
  292. </if>
  293. <if test="cusDeclStatus != null" >
  294. cus_decl_status = #{cusDeclStatus,jdbcType=CHAR},
  295. </if>
  296. <if test="notiStatue != null" >
  297. noti_statue = #{notiStatue,jdbcType=CHAR},
  298. </if>
  299. <if test="code != null" >
  300. code = #{code,jdbcType=VARCHAR},
  301. </if>
  302. <if test="msg != null" >
  303. msg = #{msg,jdbcType=VARCHAR},
  304. </if>
  305. <if test="notifyUrl != null" >
  306. notify_url = #{notifyUrl,jdbcType=VARCHAR},
  307. </if>
  308. <if test="remark != null" >
  309. remark = #{remark,jdbcType=VARCHAR},
  310. </if>
  311. <if test="createrSn != null" >
  312. creater_sn = #{createrSn,jdbcType=VARCHAR},
  313. </if>
  314. <if test="createTime != null" >
  315. create_time = #{createTime,jdbcType=VARCHAR},
  316. </if>
  317. <if test="moderSn != null" >
  318. moder_sn = #{moderSn,jdbcType=VARCHAR},
  319. </if>
  320. <if test="modTime != null" >
  321. mod_time = #{modTime,jdbcType=VARCHAR},
  322. </if>
  323. <if test="tstm != null" >
  324. tstm = #{tstm,jdbcType=TIMESTAMP},
  325. </if>
  326. </set>
  327. where noti_sn = #{notiSn,jdbcType=VARCHAR}
  328. </update>
  329. <select id="selectMerchNotis" resultMap="BaseResultMap" parameterType="java.lang.Integer">
  330. SELECT
  331. <include refid="Base_Column_List"/>
  332. FROM merch_noti WHERE noti_statue = '0' and is_stoped = '0' limit #{limit}
  333. </select>
  334. <insert id="insertBatch" parameterType="java.util.List">
  335. insert into merch_noti
  336. <trim prefix="(" suffix=")" suffixOverrides=",">
  337. noti_sn,
  338. all_pay_sn,
  339. merch_sn,
  340. merch_name,
  341. merch_erp_order_sn,
  342. plat_sn,
  343. plat_name,
  344. third_party_merch_code,
  345. third_party_merch_name,
  346. all_merch_id,
  347. all_order_no,
  348. all_pay_no,
  349. all_sub_order_no,
  350. all_sub_order_id,
  351. pay_chnl_flag,
  352. buyer_payer_check,
  353. noti_count,
  354. is_stoped,
  355. cus_decl_status,
  356. noti_statue,
  357. code,
  358. msg,
  359. notify_url,
  360. remark,
  361. creater_sn,
  362. create_time,
  363. moder_sn,
  364. mod_time
  365. </trim>
  366. VALUES
  367. <foreach collection="list" item="item" index="index" separator=",">
  368. <trim prefix="(" suffix=")" suffixOverrides=",">
  369. #{item.notiSn,jdbcType=VARCHAR},
  370. #{item.allPaySn,jdbcType=VARCHAR},
  371. #{item.merchSn,jdbcType=VARCHAR},
  372. #{item.merchName,jdbcType=VARCHAR},
  373. #{item.merchErpOrderSn, jdbcType=VARCHAR},
  374. #{item.platSn,jdbcType=VARCHAR},
  375. #{item.platName,jdbcType=VARCHAR},
  376. #{item.thirdPartyMerchCode,jdbcType=VARCHAR},
  377. #{item.thirdPartyMerchName,jdbcType=VARCHAR},
  378. #{item.allMerchId,jdbcType=VARCHAR},
  379. #{item.allOrderNo,jdbcType=VARCHAR},
  380. #{item.allPayNo,jdbcType=VARCHAR},
  381. #{item.allSubOrderNo,jdbcType=VARCHAR},
  382. #{item.allSubOrderId,jdbcType=VARCHAR},
  383. #{item.payChnlFlag,jdbcType=VARCHAR},
  384. #{item.buyerPayerCheck,jdbcType=CHAR},
  385. #{item.notiCount,jdbcType=INTEGER},
  386. #{item.isStoped,jdbcType=CHAR},
  387. #{item.cusDeclStatus,jdbcType=CHAR},
  388. #{item.notiStatue,jdbcType=CHAR},
  389. #{item.code,jdbcType=VARCHAR},
  390. #{item.msg,jdbcType=VARCHAR},
  391. #{item.notifyUrl,jdbcType=VARCHAR},
  392. #{item.remark,jdbcType=VARCHAR},
  393. #{item.createrSn,jdbcType=VARCHAR},
  394. #{item.createTime,jdbcType=VARCHAR},
  395. #{item.moderSn,jdbcType=VARCHAR},
  396. #{item.modTime,jdbcType=VARCHAR},
  397. </trim>
  398. </foreach>
  399. </insert>
  400. <update id="updateBatch" parameterType="java.util.List">
  401. <foreach collection="list" item="item" index="index" open="" close="" separator=";">
  402. update merch_noti
  403. <set >
  404. <if test="item.allPaySn != null" >
  405. all_pay_sn = #{item.allPaySn,jdbcType=VARCHAR},
  406. </if>
  407. <if test="item.merchSn != null" >
  408. merch_sn = #{item.merchSn,jdbcType=VARCHAR},
  409. </if>
  410. <if test="item.merchName != null" >
  411. merch_name = #{item.merchName,jdbcType=VARCHAR},
  412. </if>
  413. <if test="item.merchErpOrderSn != null">
  414. merch_erp_order_sn = #{item.merchErpOrderSn,jdbcType=VARCHAR},
  415. </if>
  416. <if test="item.platSn != null" >
  417. plat_sn = #{item.platSn,jdbcType=VARCHAR},
  418. </if>
  419. <if test="item.platName != null" >
  420. plat_name = #{item.platName,jdbcType=VARCHAR},
  421. </if>
  422. <if test="item.thirdPartyMerchCode != null" >
  423. third_party_merch_code = #{item.thirdPartyMerchCode,jdbcType=VARCHAR},
  424. </if>
  425. <if test="item.thirdPartyMerchName != null" >
  426. third_party_merch_name = #{thirdPartyMerchName,jdbcType=VARCHAR},
  427. </if>
  428. <if test="item.allMerchId != null" >
  429. all_merch_id = #{item.allMerchId,jdbcType=VARCHAR},
  430. </if>
  431. <if test="item.allOrderNo != null" >
  432. all_order_no = #{item.allOrderNo,jdbcType=VARCHAR},
  433. </if>
  434. <if test="item.allPayNo != null" >
  435. all_pay_no = #{item.allPayNo,jdbcType=VARCHAR},
  436. </if>
  437. <if test="item.allSubOrderNo != null" >
  438. all_sub_order_no = #{item.allSubOrderNo,jdbcType=VARCHAR},
  439. </if>
  440. <if test="item.allSubOrderId != null" >
  441. all_sub_order_id = #{item.allSubOrderId,jdbcType=VARCHAR},
  442. </if>
  443. <if test="item.payChnlFlag != null" >
  444. pay_chnl_flag = #{item.payChnlFlag,jdbcType=VARCHAR},
  445. </if>
  446. <if test="item.buyerPayerCheck != null" >
  447. buyer_payer_check = #{item.buyerPayerCheck,jdbcType=CHAR},
  448. </if>
  449. <if test="item.notiCount != null" >
  450. noti_count = #{item.notiCount,jdbcType=INTEGER},
  451. </if>
  452. <if test="item.isStoped != null" >
  453. is_stoped = #{item.isStoped,jdbcType=CHAR},
  454. </if>
  455. <if test="item.cusDeclStatus != null" >
  456. cus_decl_status = #{item.cusDeclStatus,jdbcType=CHAR},
  457. </if>
  458. <if test="item.notiStatue != null" >
  459. noti_statue = #{item.notiStatue,jdbcType=CHAR},
  460. </if>
  461. <if test="item.code != null" >
  462. code = #{item.code,jdbcType=VARCHAR},
  463. </if>
  464. <if test="item.msg != null" >
  465. msg = #{item.msg,jdbcType=VARCHAR},
  466. </if>
  467. <if test="item.notifyUrl != null" >
  468. notify_url = #{item.notifyUrl,jdbcType=VARCHAR},
  469. </if>
  470. <if test="item.remark != null" >
  471. remark = #{item.remark,jdbcType=VARCHAR},
  472. </if>
  473. <if test="item.createrSn != null" >
  474. creater_sn = #{item.createrSn,jdbcType=VARCHAR},
  475. </if>
  476. <if test="item.createTime != null" >
  477. create_time = #{item.createTime,jdbcType=VARCHAR},
  478. </if>
  479. <if test="item.moderSn != null" >
  480. moder_sn = #{item.moderSn,jdbcType=VARCHAR},
  481. </if>
  482. <if test="item.modTime != null" >
  483. mod_time = #{item.modTime,jdbcType=VARCHAR},
  484. </if>
  485. <if test="item.tstm != null" >
  486. tstm = #{item.tstm,jdbcType=TIMESTAMP},
  487. </if>
  488. </set>
  489. where noti_sn = #{item.notiSn,jdbcType=VARCHAR}
  490. </foreach>
  491. </update>
  492. </mapper>