1
0

PinganPayOrderDao.xml 11 KB

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