MerchNotiMapper.xml 16 KB

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