MerchNotiMapper.xml 17 KB

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