UserOrderRefundMapper.xml 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345
  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.yonge.cooleshow.mbg.mapper.UserOrderRefundMapper">
  4. <resultMap id="BaseResultMap" type="com.yonge.cooleshow.mbg.model.UserOrderRefund">
  5. <!--@mbg.generated-->
  6. <!--@Table user_order_refund-->
  7. <id column="id_" jdbcType="BIGINT" property="id" />
  8. <result column="return_id_" jdbcType="VARCHAR" property="returnId" />
  9. <result column="order_no_" jdbcType="VARCHAR" property="orderNo" />
  10. <result column="trans_no_" jdbcType="VARCHAR" property="transNo" />
  11. <result column="pay_trans_no_" jdbcType="VARCHAR" property="payTransNo" />
  12. <result column="refund_amt_" jdbcType="DECIMAL" property="refundAmt" />
  13. <result column="fee_amt_" jdbcType="DECIMAL" property="feeAmt" />
  14. <result column="status_" jdbcType="VARCHAR" property="status" />
  15. <result column="pay_fail_msg_" jdbcType="VARCHAR" property="payFailMsg" />
  16. <result column="arrival_time_" jdbcType="TIMESTAMP" property="arrivalTime" />
  17. <result column="create_time_" jdbcType="TIMESTAMP" property="createTime" />
  18. <result column="update_time_" jdbcType="TIMESTAMP" property="updateTime" />
  19. </resultMap>
  20. <sql id="Example_Where_Clause">
  21. <!--@mbg.generated-->
  22. <where>
  23. <foreach collection="oredCriteria" item="criteria" separator="or">
  24. <if test="criteria.valid">
  25. <trim prefix="(" prefixOverrides="and" suffix=")">
  26. <foreach collection="criteria.criteria" item="criterion">
  27. <choose>
  28. <when test="criterion.noValue">
  29. and ${criterion.condition}
  30. </when>
  31. <when test="criterion.singleValue">
  32. and ${criterion.condition} #{criterion.value}
  33. </when>
  34. <when test="criterion.betweenValue">
  35. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  36. </when>
  37. <when test="criterion.listValue">
  38. and ${criterion.condition}
  39. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  40. #{listItem}
  41. </foreach>
  42. </when>
  43. </choose>
  44. </foreach>
  45. </trim>
  46. </if>
  47. </foreach>
  48. </where>
  49. </sql>
  50. <sql id="Update_By_Example_Where_Clause">
  51. <!--@mbg.generated-->
  52. <where>
  53. <foreach collection="example.oredCriteria" item="criteria" separator="or">
  54. <if test="criteria.valid">
  55. <trim prefix="(" prefixOverrides="and" suffix=")">
  56. <foreach collection="criteria.criteria" item="criterion">
  57. <choose>
  58. <when test="criterion.noValue">
  59. and ${criterion.condition}
  60. </when>
  61. <when test="criterion.singleValue">
  62. and ${criterion.condition} #{criterion.value}
  63. </when>
  64. <when test="criterion.betweenValue">
  65. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  66. </when>
  67. <when test="criterion.listValue">
  68. and ${criterion.condition}
  69. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  70. #{listItem}
  71. </foreach>
  72. </when>
  73. </choose>
  74. </foreach>
  75. </trim>
  76. </if>
  77. </foreach>
  78. </where>
  79. </sql>
  80. <sql id="Base_Column_List">
  81. <!--@mbg.generated-->
  82. id_, order_no_, trans_no_, pay_trans_no_, refund_amt_, fee_amt_, status_, pay_fail_msg_,
  83. arrival_time_, create_time_, update_time_,return_id_
  84. </sql>
  85. <select id="selectByExample" parameterType="com.yonge.cooleshow.mbg.model.UserOrderRefundExample" resultMap="BaseResultMap">
  86. <!--@mbg.generated-->
  87. select
  88. <if test="distinct">
  89. distinct
  90. </if>
  91. <include refid="Base_Column_List" />
  92. from user_order_refund
  93. <if test="_parameter != null">
  94. <include refid="Example_Where_Clause" />
  95. </if>
  96. <if test="orderByClause != null">
  97. order by ${orderByClause}
  98. </if>
  99. </select>
  100. <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
  101. <!--@mbg.generated-->
  102. select
  103. <include refid="Base_Column_List" />
  104. from user_order_refund
  105. where id_ = #{id,jdbcType=BIGINT}
  106. </select>
  107. <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
  108. <!--@mbg.generated-->
  109. delete from user_order_refund
  110. where id_ = #{id,jdbcType=BIGINT}
  111. </delete>
  112. <delete id="deleteByExample" parameterType="com.yonge.cooleshow.mbg.model.UserOrderRefundExample">
  113. <!--@mbg.generated-->
  114. delete from user_order_refund
  115. <if test="_parameter != null">
  116. <include refid="Example_Where_Clause" />
  117. </if>
  118. </delete>
  119. <insert id="insert" keyColumn="id_" keyProperty="id" parameterType="com.yonge.cooleshow.mbg.model.UserOrderRefund" useGeneratedKeys="true">
  120. <!--@mbg.generated-->
  121. insert into user_order_refund (order_no_, trans_no_, pay_trans_no_,
  122. refund_amt_, fee_amt_, status_,
  123. pay_fail_msg_, arrival_time_, create_time_,
  124. update_time_,return_id_)
  125. values (#{orderNo,jdbcType=VARCHAR}, #{transNo,jdbcType=VARCHAR}, #{payTransNo,jdbcType=VARCHAR},
  126. #{refundAmt,jdbcType=DECIMAL}, #{feeAmt,jdbcType=DECIMAL}, #{status,jdbcType=VARCHAR},
  127. #{payFailMsg,jdbcType=VARCHAR}, #{arrivalTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP},
  128. #{updateTime,jdbcType=TIMESTAMP},#{returnId})
  129. </insert>
  130. <insert id="insertSelective" keyColumn="id_" keyProperty="id" parameterType="com.yonge.cooleshow.mbg.model.UserOrderRefund" useGeneratedKeys="true">
  131. <!--@mbg.generated-->
  132. insert into user_order_refund
  133. <trim prefix="(" suffix=")" suffixOverrides=",">
  134. <if test="orderNo != null">
  135. order_no_,
  136. </if>
  137. <if test="transNo != null">
  138. trans_no_,
  139. </if>
  140. <if test="payTransNo != null">
  141. pay_trans_no_,
  142. </if>
  143. <if test="refundAmt != null">
  144. refund_amt_,
  145. </if>
  146. <if test="feeAmt != null">
  147. fee_amt_,
  148. </if>
  149. <if test="status != null">
  150. status_,
  151. </if>
  152. <if test="payFailMsg != null">
  153. pay_fail_msg_,
  154. </if>
  155. <if test="arrivalTime != null">
  156. arrival_time_,
  157. </if>
  158. <if test="createTime != null">
  159. create_time_,
  160. </if>
  161. <if test="updateTime != null">
  162. update_time_,
  163. </if>
  164. <if test="returnId != null">
  165. return_id_,
  166. </if>
  167. </trim>
  168. <trim prefix="values (" suffix=")" suffixOverrides=",">
  169. <if test="orderNo != null">
  170. #{orderNo,jdbcType=VARCHAR},
  171. </if>
  172. <if test="transNo != null">
  173. #{transNo,jdbcType=VARCHAR},
  174. </if>
  175. <if test="payTransNo != null">
  176. #{payTransNo,jdbcType=VARCHAR},
  177. </if>
  178. <if test="refundAmt != null">
  179. #{refundAmt,jdbcType=DECIMAL},
  180. </if>
  181. <if test="feeAmt != null">
  182. #{feeAmt,jdbcType=DECIMAL},
  183. </if>
  184. <if test="status != null">
  185. #{status,jdbcType=VARCHAR},
  186. </if>
  187. <if test="payFailMsg != null">
  188. #{payFailMsg,jdbcType=VARCHAR},
  189. </if>
  190. <if test="arrivalTime != null">
  191. #{arrivalTime,jdbcType=TIMESTAMP},
  192. </if>
  193. <if test="createTime != null">
  194. #{createTime,jdbcType=TIMESTAMP},
  195. </if>
  196. <if test="updateTime != null">
  197. #{updateTime,jdbcType=TIMESTAMP},
  198. </if>
  199. <if test="returnId != null">
  200. #{returnId},
  201. </if>
  202. </trim>
  203. </insert>
  204. <select id="countByExample" parameterType="com.yonge.cooleshow.mbg.model.UserOrderRefundExample" resultType="java.lang.Long">
  205. <!--@mbg.generated-->
  206. select count(*) from user_order_refund
  207. <if test="_parameter != null">
  208. <include refid="Example_Where_Clause" />
  209. </if>
  210. </select>
  211. <update id="updateByExampleSelective" parameterType="map">
  212. <!--@mbg.generated-->
  213. update user_order_refund
  214. <set>
  215. <if test="record.id != null">
  216. id_ = #{record.id,jdbcType=BIGINT},
  217. </if>
  218. <if test="record.orderNo != null">
  219. order_no_ = #{record.orderNo,jdbcType=VARCHAR},
  220. </if>
  221. <if test="record.transNo != null">
  222. trans_no_ = #{record.transNo,jdbcType=VARCHAR},
  223. </if>
  224. <if test="record.payTransNo != null">
  225. pay_trans_no_ = #{record.payTransNo,jdbcType=VARCHAR},
  226. </if>
  227. <if test="record.refundAmt != null">
  228. refund_amt_ = #{record.refundAmt,jdbcType=DECIMAL},
  229. </if>
  230. <if test="record.feeAmt != null">
  231. fee_amt_ = #{record.feeAmt,jdbcType=DECIMAL},
  232. </if>
  233. <if test="record.status != null">
  234. status_ = #{record.status,jdbcType=VARCHAR},
  235. </if>
  236. <if test="record.payFailMsg != null">
  237. pay_fail_msg_ = #{record.payFailMsg,jdbcType=VARCHAR},
  238. </if>
  239. <if test="record.arrivalTime != null">
  240. arrival_time_ = #{record.arrivalTime,jdbcType=TIMESTAMP},
  241. </if>
  242. <if test="record.createTime != null">
  243. create_time_ = #{record.createTime,jdbcType=TIMESTAMP},
  244. </if>
  245. <if test="record.updateTime != null">
  246. update_time_ = #{record.updateTime,jdbcType=TIMESTAMP},
  247. </if>
  248. <if test="record.returnId != null">
  249. return_id_ = #{record.returnId,jdbcType=BIGINT},
  250. </if>
  251. </set>
  252. <if test="_parameter != null">
  253. <include refid="Update_By_Example_Where_Clause" />
  254. </if>
  255. </update>
  256. <update id="updateByExample" parameterType="map">
  257. <!--@mbg.generated-->
  258. update user_order_refund
  259. set id_ = #{record.id,jdbcType=BIGINT},
  260. order_no_ = #{record.orderNo,jdbcType=VARCHAR},
  261. trans_no_ = #{record.transNo,jdbcType=VARCHAR},
  262. pay_trans_no_ = #{record.payTransNo,jdbcType=VARCHAR},
  263. refund_amt_ = #{record.refundAmt,jdbcType=DECIMAL},
  264. fee_amt_ = #{record.feeAmt,jdbcType=DECIMAL},
  265. status_ = #{record.status,jdbcType=VARCHAR},
  266. pay_fail_msg_ = #{record.payFailMsg,jdbcType=VARCHAR},
  267. arrival_time_ = #{record.arrivalTime,jdbcType=TIMESTAMP},
  268. create_time_ = #{record.createTime,jdbcType=TIMESTAMP},
  269. return_id_ = #{record.returnId,jdbcType=BIGINT},
  270. update_time_ = #{record.updateTime,jdbcType=TIMESTAMP}
  271. <if test="_parameter != null">
  272. <include refid="Update_By_Example_Where_Clause" />
  273. </if>
  274. </update>
  275. <update id="updateByPrimaryKeySelective" parameterType="com.yonge.cooleshow.mbg.model.UserOrderRefund">
  276. <!--@mbg.generated-->
  277. update user_order_refund
  278. <set>
  279. <if test="orderNo != null">
  280. order_no_ = #{orderNo,jdbcType=VARCHAR},
  281. </if>
  282. <if test="transNo != null">
  283. trans_no_ = #{transNo,jdbcType=VARCHAR},
  284. </if>
  285. <if test="payTransNo != null">
  286. pay_trans_no_ = #{payTransNo,jdbcType=VARCHAR},
  287. </if>
  288. <if test="refundAmt != null">
  289. refund_amt_ = #{refundAmt,jdbcType=DECIMAL},
  290. </if>
  291. <if test="feeAmt != null">
  292. fee_amt_ = #{feeAmt,jdbcType=DECIMAL},
  293. </if>
  294. <if test="status != null">
  295. status_ = #{status,jdbcType=VARCHAR},
  296. </if>
  297. <if test="payFailMsg != null">
  298. pay_fail_msg_ = #{payFailMsg,jdbcType=VARCHAR},
  299. </if>
  300. <if test="arrivalTime != null">
  301. arrival_time_ = #{arrivalTime,jdbcType=TIMESTAMP},
  302. </if>
  303. <if test="createTime != null">
  304. create_time_ = #{createTime,jdbcType=TIMESTAMP},
  305. </if>
  306. <if test="updateTime != null">
  307. update_time_ = #{updateTime,jdbcType=TIMESTAMP},
  308. </if>
  309. <if test="returnId != null">
  310. return_id_ = #{returnId,jdbcType=BIGINT},
  311. </if>
  312. </set>
  313. where id_ = #{id,jdbcType=BIGINT}
  314. </update>
  315. <update id="updateByPrimaryKey" parameterType="com.yonge.cooleshow.mbg.model.UserOrderRefund">
  316. <!--@mbg.generated-->
  317. update user_order_refund
  318. set order_no_ = #{orderNo,jdbcType=VARCHAR},
  319. trans_no_ = #{transNo,jdbcType=VARCHAR},
  320. pay_trans_no_ = #{payTransNo,jdbcType=VARCHAR},
  321. refund_amt_ = #{refundAmt,jdbcType=DECIMAL},
  322. fee_amt_ = #{feeAmt,jdbcType=DECIMAL},
  323. status_ = #{status,jdbcType=VARCHAR},
  324. pay_fail_msg_ = #{payFailMsg,jdbcType=VARCHAR},
  325. arrival_time_ = #{arrivalTime,jdbcType=TIMESTAMP},
  326. create_time_ = #{createTime,jdbcType=TIMESTAMP},
  327. return_id_ = #{returnId,jdbcType=BIGINT},
  328. update_time_ = #{updateTime,jdbcType=TIMESTAMP}
  329. where id_ = #{id,jdbcType=BIGINT}
  330. </update>
  331. <select id="selectByTransNo" resultMap="BaseResultMap">
  332. select
  333. <include refid="Base_Column_List" />
  334. from user_order_refund
  335. where #{transNo} = trans_no_ limit 1
  336. </select>
  337. <select id="selectByRefundNo" resultMap="BaseResultMap">
  338. select
  339. <include refid="Base_Column_List" />
  340. from user_order_refund
  341. where #{refundOrderNo} = order_no_ limit 1
  342. </select>
  343. </mapper>