1
0

PinganPayOrderDao.xml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363
  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.PinganPayOrderDao">
  4. <resultMap type="com.kmall.manager.manager.pingan.dto.PinganPayOrderDto" id="pinganPayOrderMap">
  5. <result property="id" column="id"/>
  6. <result property="outNo" column="out_no"/>
  7. <result property="pmtName" column="pmt_name"/>
  8. <result property="pmtTag" column="pmt_tag"/>
  9. <result property="ordMctId" column="ord_mct_id"/>
  10. <result property="ordShopId" column="ord_shop_id"/>
  11. <result property="ordCurrency" column="ord_currency"/>
  12. <result property="currencySign" column="currency_sign"/>
  13. <result property="ordNo" column="ord_no"/>
  14. <result property="ordType" column="ord_type"/>
  15. <result property="originalAmount" column="original_amount"/>
  16. <result property="discountAmount" column="discount_amount"/>
  17. <result property="ignoreAmount" column="ignore_amount"/>
  18. <result property="tradeAccount" column="trade_account"/>
  19. <result property="tradeNo" column="trade_no"/>
  20. <result property="tradeAmount" column="trade_amount"/>
  21. <result property="tradeQrcode" column="trade_qrcode"/>
  22. <result property="amount" column="amount"/>
  23. <result property="tradeTime" column="trade_time"/>
  24. <result property="tradePayTime" column="trade_pay_time"/>
  25. <result property="payTime" column="pay_time"/>
  26. <result property="status" column="status"/>
  27. <result property="tradeResult" column="trade_result"/>
  28. <result property="jsapiPayUrl" column="jsapi_pay_url"/>
  29. <result property="randStr" column="rand_str"/>
  30. <result property="appid" column="appId"/>
  31. <result property="timeStamp" column="timeStamp"/>
  32. <result property="noncestr" column="nonceStr"/>
  33. <result property="signtype" column="signType"/>
  34. <result property="prepayId" column="prepay_id"/>
  35. <result property="paysign" column="paySign"/>
  36. <result property="createrSn" column="creater_sn"/>
  37. <result property="createTime" column="create_time"/>
  38. <result property="moderSn" column="moder_sn"/>
  39. <result property="modTime" column="mod_time"/>
  40. <result property="tstm" column="tstm"/>
  41. </resultMap>
  42. <select id="queryObject" resultType="com.kmall.manager.manager.pingan.dto.PinganPayOrderDto">
  43. select
  44. `id`,
  45. `out_no`,
  46. `pmt_name`,
  47. `pmt_tag`,
  48. `ord_mct_id`,
  49. `ord_shop_id`,
  50. `ord_currency`,
  51. `currency_sign`,
  52. `ord_no`,
  53. `ord_type`,
  54. `original_amount`,
  55. `discount_amount`,
  56. `ignore_amount`,
  57. `trade_account`,
  58. `trade_no`,
  59. `trade_amount`,
  60. `trade_qrcode`,
  61. `amount`,
  62. `trade_time`,
  63. `trade_pay_time`,
  64. `pay_time`,
  65. `status`,
  66. `trade_result`,
  67. `jsapi_pay_url`,
  68. `rand_str`,
  69. `appId`,
  70. `timeStamp`,
  71. `nonceStr`,
  72. `signType`,
  73. `prepay_id`,
  74. `paySign`,
  75. `creater_sn`,
  76. `create_time`,
  77. `moder_sn`,
  78. `mod_time`,
  79. `tstm`
  80. from pingan_pay_order
  81. where id = #{id}
  82. </select>
  83. <select id="queryByOutNo" resultType="com.kmall.manager.manager.pingan.dto.PinganPayOrderDto">
  84. select
  85. `id`,
  86. `out_no`,
  87. `pmt_name`,
  88. `pmt_tag`,
  89. `ord_mct_id`,
  90. `ord_shop_id`,
  91. `ord_currency`,
  92. `currency_sign`,
  93. `ord_no`,
  94. `ord_type`,
  95. `original_amount`,
  96. `discount_amount`,
  97. `ignore_amount`,
  98. `trade_account`,
  99. `trade_no`,
  100. `trade_amount`,
  101. `trade_qrcode`,
  102. `amount`,
  103. `trade_time`,
  104. `trade_pay_time`,
  105. `pay_time`,
  106. `status`,
  107. `trade_result`,
  108. `jsapi_pay_url`,
  109. `rand_str`,
  110. `appId`,
  111. `timeStamp`,
  112. `nonceStr`,
  113. `signType`,
  114. `prepay_id`,
  115. `paySign`,
  116. `creater_sn`,
  117. `create_time`,
  118. `moder_sn`,
  119. `mod_time`,
  120. `tstm`
  121. from pingan_pay_order
  122. where out_no = #{outNo}
  123. </select>
  124. <select id="queryList" resultType="com.kmall.manager.manager.pingan.dto.PinganPayOrderDto">
  125. select
  126. `id`,
  127. `out_no`,
  128. `pmt_name`,
  129. `pmt_tag`,
  130. `ord_mct_id`,
  131. `ord_shop_id`,
  132. `ord_currency`,
  133. `currency_sign`,
  134. `ord_no`,
  135. `ord_type`,
  136. `original_amount`,
  137. `discount_amount`,
  138. `ignore_amount`,
  139. `trade_account`,
  140. `trade_no`,
  141. `trade_amount`,
  142. `trade_qrcode`,
  143. `amount`,
  144. `trade_time`,
  145. `trade_pay_time`,
  146. `pay_time`,
  147. `status`,
  148. `trade_result`,
  149. `jsapi_pay_url`,
  150. `rand_str`,
  151. `appId`,
  152. `timeStamp`,
  153. `nonceStr`,
  154. `signType`,
  155. `prepay_id`,
  156. `paySign`,
  157. `creater_sn`,
  158. `create_time`,
  159. `moder_sn`,
  160. `mod_time`,
  161. `tstm`
  162. from pingan_pay_order
  163. WHERE 1=1
  164. <if test="name != null and name.trim() != ''">
  165. AND name LIKE concat('%',#{name},'%')
  166. </if>
  167. <choose>
  168. <when test="sidx != null and sidx.trim() != ''">
  169. order by ${sidx} ${order}
  170. </when>
  171. <otherwise>
  172. order by id desc
  173. </otherwise>
  174. </choose>
  175. <if test="offset != null and limit != null">
  176. limit #{offset}, #{limit}
  177. </if>
  178. </select>
  179. <select id="queryTotal" resultType="int">
  180. select count(*) from pingan_pay_order
  181. WHERE 1=1
  182. <if test="name != null and name.trim() != ''">
  183. AND name LIKE concat('%',#{name},'%')
  184. </if>
  185. </select>
  186. <insert id="save" parameterType="com.kmall.manager.manager.pingan.dto.PinganPayOrderDto">
  187. insert into pingan_pay_order(
  188. `id`,
  189. `out_no`,
  190. `pmt_name`,
  191. `pmt_tag`,
  192. `ord_mct_id`,
  193. `ord_shop_id`,
  194. `ord_currency`,
  195. `currency_sign`,
  196. `ord_no`,
  197. `ord_type`,
  198. `original_amount`,
  199. `discount_amount`,
  200. `ignore_amount`,
  201. `trade_account`,
  202. `trade_no`,
  203. `trade_amount`,
  204. `trade_qrcode`,
  205. `amount`,
  206. `trade_time`,
  207. `trade_pay_time`,
  208. `pay_time`,
  209. `status`,
  210. `trade_result`,
  211. `jsapi_pay_url`,
  212. `rand_str`,
  213. `appId`,
  214. `timeStamp`,
  215. `nonceStr`,
  216. `signType`,
  217. `prepay_id`,
  218. `paySign`,
  219. `creater_sn`,
  220. `create_time`,
  221. `moder_sn`,
  222. `mod_time`,
  223. `tstm`)
  224. values(
  225. #{id},
  226. #{outNo},
  227. #{pmtName},
  228. #{pmtTag},
  229. #{ordMctId},
  230. #{ordShopId},
  231. #{ordCurrency},
  232. #{currencySign},
  233. #{ordNo},
  234. #{ordType},
  235. #{originalAmount},
  236. #{discountAmount},
  237. #{ignoreAmount},
  238. #{tradeAccount},
  239. #{tradeNo},
  240. #{tradeAmount},
  241. #{tradeQrcode},
  242. #{amount},
  243. #{tradeTime},
  244. #{tradePayTime},
  245. #{payTime},
  246. #{status},
  247. #{tradeResult},
  248. #{jsapiPayUrl},
  249. #{randStr},
  250. #{appid},
  251. #{timeStamp},
  252. #{noncestr},
  253. #{signtype},
  254. #{prepayId},
  255. #{paysign},
  256. #{createrSn},
  257. #{createTime},
  258. #{moderSn},
  259. #{modTime},
  260. #{tstm})
  261. </insert>
  262. <update id="update" parameterType="com.kmall.manager.manager.pingan.dto.PinganPayOrderDto">
  263. update pingan_pay_order
  264. <set>
  265. <if test="outNo != null">`out_no` = #{outNo}, </if>
  266. <if test="pmtName != null">`pmt_name` = #{pmtName}, </if>
  267. <if test="pmtTag != null">`pmt_tag` = #{pmtTag}, </if>
  268. <if test="ordMctId != null">`ord_mct_id` = #{ordMctId}, </if>
  269. <if test="ordShopId != null">`ord_currency` = #{ordShopId}, </if>
  270. <if test="ordCurrency != null">`ord_shop_id` = #{ordCurrency}, </if>
  271. <if test="currencySign != null">`currency_sign` = #{currencySign}, </if>
  272. <if test="ordNo != null">`ord_no` = #{ordNo}, </if>
  273. <if test="ordType != null">`ord_type` = #{ordType}, </if>
  274. <if test="originalAmount != null">`original_amount` = #{originalAmount}, </if>
  275. <if test="discountAmount != null">`discount_amount` = #{discountAmount}, </if>
  276. <if test="ignoreAmount != null">`ignore_amount` = #{ignoreAmount}, </if>
  277. <if test="tradeAccount != null">`trade_account` = #{tradeAccount}, </if>
  278. <if test="tradeNo != null">`trade_no` = #{tradeNo}, </if>
  279. <if test="tradeAmount != null">`trade_amount` = #{tradeAmount}, </if>
  280. <if test="tradeQrcode != null">`trade_qrcode` = #{tradeQrcode}, </if>
  281. <if test="amount != null">`amount` = #{amount}, </if>
  282. <if test="tradeTime != null">`trade_time` = #{tradeTime}, </if>
  283. <if test="tradePayTime != null">`trade_pay_time` = #{tradePayTime}, </if>
  284. <if test="payTime != null">`pay_time` = #{payTime}, </if>
  285. <if test="status != null">`status` = #{status}, </if>
  286. <if test="tradeResult != null">`trade_result` = #{tradeResult}, </if>
  287. <if test="jsapiPayUrl != null">`jsapi_pay_url` = #{jsapiPayUrl}, </if>
  288. <if test="randStr != null">`rand_str` = #{randStr}, </if>
  289. <if test="appid != null">`appId` = #{appid}, </if>
  290. <if test="timeStamp != null">`timeStamp` = #{timeStamp}, </if>
  291. <if test="noncestr != null">`nonceStr` = #{noncestr}, </if>
  292. <if test="signtype != null">`signType` = #{signtype}, </if>
  293. <if test="prepayId != null">`prepay_id` = #{prepayId}, </if>
  294. <if test="paysign != null">`paySign` = #{paysign}, </if>
  295. <if test="createrSn != null">`creater_sn` = #{createrSn}, </if>
  296. <if test="createTime != null">`create_time` = #{createTime}, </if>
  297. <if test="moderSn != null">`moder_sn` = #{moderSn}, </if>
  298. <if test="modTime != null">`mod_time` = #{modTime}, </if>
  299. <if test="tstm != null">`tstm` = #{tstm}</if>
  300. </set>
  301. where id = #{id}
  302. </update>
  303. <update id="updateByOutNo" parameterType="com.kmall.manager.manager.pingan.dto.PinganPayOrderDto">
  304. update pingan_pay_order
  305. <set>
  306. <if test="pmtName != null">`pmt_name` = #{pmtName}, </if>
  307. <if test="pmtTag != null">`pmt_tag` = #{pmtTag}, </if>
  308. <if test="ordMctId != null">`ord_mct_id` = #{ordMctId}, </if>
  309. <if test="ordShopId != null">`ord_currency` = #{ordShopId}, </if>
  310. <if test="ordCurrency != null">`ord_shop_id` = #{ordCurrency}, </if>
  311. <if test="currencySign != null">`currency_sign` = #{currencySign}, </if>
  312. <if test="ordNo != null">`ord_no` = #{ordNo}, </if>
  313. <if test="ordType != null">`ord_type` = #{ordType}, </if>
  314. <if test="originalAmount != null">`original_amount` = #{originalAmount}, </if>
  315. <if test="discountAmount != null">`discount_amount` = #{discountAmount}, </if>
  316. <if test="ignoreAmount != null">`ignore_amount` = #{ignoreAmount}, </if>
  317. <if test="tradeAccount != null">`trade_account` = #{tradeAccount}, </if>
  318. <if test="tradeNo != null">`trade_no` = #{tradeNo}, </if>
  319. <if test="tradeAmount != null">`trade_amount` = #{tradeAmount}, </if>
  320. <if test="tradeQrcode != null">`trade_qrcode` = #{tradeQrcode}, </if>
  321. <if test="amount != null">`amount` = #{amount}, </if>
  322. <if test="tradeTime != null">`trade_time` = #{tradeTime}, </if>
  323. <if test="tradePayTime != null">`trade_pay_time` = #{tradePayTime}, </if>
  324. <if test="payTime != null">`pay_time` = #{payTime}, </if>
  325. <if test="status != null">`status` = #{status}, </if>
  326. <if test="tradeResult != null">`trade_result` = #{tradeResult}, </if>
  327. <if test="jsapiPayUrl != null">`jsapi_pay_url` = #{jsapiPayUrl}, </if>
  328. <if test="randStr != null">`rand_str` = #{randStr}, </if>
  329. <if test="appid != null">`appId` = #{appid}, </if>
  330. <if test="timeStamp != null">`timeStamp` = #{timeStamp}, </if>
  331. <if test="noncestr != null">`nonceStr` = #{noncestr}, </if>
  332. <if test="signtype != null">`signType` = #{signtype}, </if>
  333. <if test="prepayId != null">`prepay_id` = #{prepayId}, </if>
  334. <if test="paysign != null">`paySign` = #{paysign}, </if>
  335. <if test="createrSn != null">`creater_sn` = #{createrSn}, </if>
  336. <if test="createTime != null">`create_time` = #{createTime}, </if>
  337. <if test="moderSn != null">`moder_sn` = #{moderSn}, </if>
  338. <if test="modTime != null">`mod_time` = #{modTime}, </if>
  339. <if test="tstm != null">`tstm` = #{tstm}</if>
  340. </set>
  341. where `out_no` = #{outNo}
  342. </update>
  343. <delete id="delete">
  344. delete from pingan_pay_order where id = #{value}
  345. </delete>
  346. <delete id="deleteBatch">
  347. delete from pingan_pay_order where id in
  348. <foreach item="id" collection="array" open="(" separator="," close=")">
  349. #{id}
  350. </foreach>
  351. </delete>
  352. </mapper>