BBusiPaymentOrdersMapper.xml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="com.ruoyi.voluntary.mapper.BBusiPaymentOrdersMapper">
  6. <resultMap type="BBusiPaymentOrders" id="BBusiPaymentOrdersResult">
  7. <result property="id" column="id" />
  8. <result property="code" column="code" />
  9. <result property="outTradeNo" column="outTradeNo" />
  10. <result property="qrcodeId" column="qrcodeId" />
  11. <result property="type" column="type" />
  12. <result property="cardId" column="cardId" />
  13. <result property="cardNo" column="cardNo" />
  14. <result property="year" column="year" />
  15. <result property="phonenumber" column="phonenumber" />
  16. <result property="transactionId" column="transaction_id" />
  17. <result property="customerCode" column="customerCode" />
  18. <result property="outTime" column="outTime" />
  19. <result property="price" column="price" />
  20. <result property="num" column="num" />
  21. <result property="fee" column="fee" />
  22. <result property="totalFee" column="totalFee" />
  23. <result property="payFee" column="payFee" />
  24. <result property="createTime" column="createTime" />
  25. <result property="creator" column="creator" />
  26. <result property="body" column="body" />
  27. <result property="detail" column="detail" />
  28. <result property="attach" column="attach" />
  29. <result property="prepayId" column="prepayId" />
  30. <result property="payer" column="payer" />
  31. <result property="payTime" column="payTime" />
  32. <result property="feedBack" column="feedBack" />
  33. <result property="syncTime" column="syncTime" />
  34. <result property="status" column="status" />
  35. </resultMap>
  36. <sql id="selectBBusiPaymentOrdersVo">
  37. select id, code, outTradeNo, qrcodeId, type, cardId, cardNo, year, phonenumber, transaction_id, customerCode, outTime, price, num, fee, totalFee, payFee, createTime, creator, body, detail, attach, prepayId, payer, payTime, feedBack, syncTime, status from b_busi_payment_orders
  38. </sql>
  39. <select id="selectBBusiPaymentOrdersList" parameterType="BBusiPaymentOrders" resultMap="BBusiPaymentOrdersResult">
  40. <include refid="selectBBusiPaymentOrdersVo"/>
  41. <where>
  42. <if test="code != null and code != ''"> and code = #{code}</if>
  43. <if test="outTradeNo != null and outTradeNo != ''"> and outTradeNo = #{outTradeNo}</if>
  44. <if test="qrcodeId != null and qrcodeId != ''"> and qrcodeId = #{qrcodeId}</if>
  45. <if test="type != null and type != ''"> and type = #{type}</if>
  46. <if test="cardId != null "> and cardId = #{cardId}</if>
  47. <if test="cardNo != null and cardNo != ''"> and cardNo = #{cardNo}</if>
  48. <if test="year != null and year != ''"> and year = #{year}</if>
  49. <if test="phonenumber != null and phonenumber != ''"> and phonenumber = #{phonenumber}</if>
  50. <if test="transactionId != null and transactionId != ''"> and transaction_id = #{transactionId}</if>
  51. <if test="customerCode != null and customerCode != ''"> and customerCode = #{customerCode}</if>
  52. <if test="outTime != null "> and outTime = #{outTime}</if>
  53. <if test="price != null "> and price = #{price}</if>
  54. <if test="num != null "> and num = #{num}</if>
  55. <if test="fee != null "> and fee = #{fee}</if>
  56. <if test="totalFee != null "> and totalFee = #{totalFee}</if>
  57. <if test="payFee != null "> and payFee = #{payFee}</if>
  58. <if test="createTime != null "> and createTime = #{createTime}</if>
  59. <if test="creator != null and creator != ''"> and creator = #{creator}</if>
  60. <if test="body != null and body != ''"> and body = #{body}</if>
  61. <if test="detail != null and detail != ''"> and detail = #{detail}</if>
  62. <if test="attach != null and attach != ''"> and attach = #{attach}</if>
  63. <if test="prepayId != null and prepayId != ''"> and prepayId = #{prepayId}</if>
  64. <if test="payer != null and payer != ''"> and payer = #{payer}</if>
  65. <if test="payTime != null "> and payTime = #{payTime}</if>
  66. <if test="feedBack != null and feedBack != ''"> and feedBack = #{feedBack}</if>
  67. <if test="syncTime != null "> and syncTime = #{syncTime}</if>
  68. <if test="status != null "> and status = #{status}</if>
  69. </where>
  70. order by id desc
  71. </select>
  72. <select id="selectBBusiPaymentOrdersById" parameterType="Long" resultMap="BBusiPaymentOrdersResult">
  73. <include refid="selectBBusiPaymentOrdersVo"/>
  74. where id = #{id}
  75. </select>
  76. <select id="selectBBusiPaymentOrdersByCardNo" parameterType="String" resultMap="BBusiPaymentOrdersResult">
  77. <include refid="selectBBusiPaymentOrdersVo"/>
  78. where cardNo = #{cardNo}
  79. </select>
  80. <insert id="insertBBusiPaymentOrders" parameterType="BBusiPaymentOrders" useGeneratedKeys="true" keyProperty="id">
  81. insert into b_busi_payment_orders
  82. <trim prefix="(" suffix=")" suffixOverrides=",">
  83. <if test="code != null and code != ''">code,</if>
  84. <if test="outTradeNo != null and outTradeNo != ''">outTradeNo,</if>
  85. <if test="qrcodeId != null">qrcodeId,</if>
  86. <if test="type != null">type,</if>
  87. <if test="cardId != null">cardId,</if>
  88. <if test="cardNo != null">cardNo,</if>
  89. <if test="year != null and year != ''">year,</if>
  90. <if test="phonenumber != null">phonenumber,</if>
  91. <if test="transactionId != null">transaction_id,</if>
  92. <if test="customerCode != null">customerCode,</if>
  93. <if test="outTime != null">outTime,</if>
  94. <if test="price != null">price,</if>
  95. <if test="num != null">num,</if>
  96. <if test="fee != null">fee,</if>
  97. <if test="totalFee != null">totalFee,</if>
  98. <if test="payFee != null">payFee,</if>
  99. <if test="createTime != null">createTime,</if>
  100. <if test="creator != null and creator != ''">creator,</if>
  101. <if test="body != null">body,</if>
  102. <if test="detail != null">detail,</if>
  103. <if test="attach != null">attach,</if>
  104. <if test="prepayId != null">prepayId,</if>
  105. <if test="payer != null">payer,</if>
  106. <if test="payTime != null">payTime,</if>
  107. <if test="feedBack != null">feedBack,</if>
  108. <if test="syncTime != null">syncTime,</if>
  109. <if test="status != null">status,</if>
  110. </trim>
  111. <trim prefix="values (" suffix=")" suffixOverrides=",">
  112. <if test="code != null and code != ''">#{code},</if>
  113. <if test="outTradeNo != null and outTradeNo != ''">#{outTradeNo},</if>
  114. <if test="qrcodeId != null">#{qrcodeId},</if>
  115. <if test="type != null">#{type},</if>
  116. <if test="cardId != null">#{cardId},</if>
  117. <if test="cardNo != null">#{cardNo},</if>
  118. <if test="year != null and year != ''">#{year},</if>
  119. <if test="phonenumber != null">#{phonenumber},</if>
  120. <if test="transactionId != null">#{transactionId},</if>
  121. <if test="customerCode != null">#{customerCode},</if>
  122. <if test="outTime != null">#{outTime},</if>
  123. <if test="price != null">#{price},</if>
  124. <if test="num != null">#{num},</if>
  125. <if test="fee != null">#{fee},</if>
  126. <if test="totalFee != null">#{totalFee},</if>
  127. <if test="payFee != null">#{payFee},</if>
  128. <if test="createTime != null">#{createTime},</if>
  129. <if test="creator != null and creator != ''">#{creator},</if>
  130. <if test="body != null">#{body},</if>
  131. <if test="detail != null">#{detail},</if>
  132. <if test="attach != null">#{attach},</if>
  133. <if test="prepayId != null">#{prepayId},</if>
  134. <if test="payer != null">#{payer},</if>
  135. <if test="payTime != null">#{payTime},</if>
  136. <if test="feedBack != null">#{feedBack},</if>
  137. <if test="syncTime != null">#{syncTime},</if>
  138. <if test="status != null">#{status},</if>
  139. </trim>
  140. </insert>
  141. <update id="updateBBusiPaymentOrders" parameterType="BBusiPaymentOrders">
  142. update b_busi_payment_orders
  143. <trim prefix="SET" suffixOverrides=",">
  144. <if test="code != null and code != ''">code = #{code},</if>
  145. <if test="outTradeNo != null and outTradeNo != ''">outTradeNo = #{outTradeNo},</if>
  146. <if test="qrcodeId != null">qrcodeId = #{qrcodeId},</if>
  147. <if test="type != null">type = #{type},</if>
  148. <if test="cardId != null">cardId = #{cardId},</if>
  149. <if test="cardNo != null">cardNo = #{cardNo},</if>
  150. <if test="year != null and year != ''">year = #{year},</if>
  151. <if test="phonenumber != null">phonenumber = #{phonenumber},</if>
  152. <if test="transactionId != null">transaction_id = #{transactionId},</if>
  153. <if test="customerCode != null">customerCode = #{customerCode},</if>
  154. <if test="outTime != null">outTime = #{outTime},</if>
  155. <if test="price != null">price = #{price},</if>
  156. <if test="num != null">num = #{num},</if>
  157. <if test="fee != null">fee = #{fee},</if>
  158. <if test="totalFee != null">totalFee = #{totalFee},</if>
  159. <if test="payFee != null">payFee = #{payFee},</if>
  160. <if test="createTime != null">createTime = #{createTime},</if>
  161. <if test="creator != null and creator != ''">creator = #{creator},</if>
  162. <if test="body != null">body = #{body},</if>
  163. <if test="detail != null">detail = #{detail},</if>
  164. <if test="attach != null">attach = #{attach},</if>
  165. <if test="prepayId != null">prepayId = #{prepayId},</if>
  166. <if test="payer != null">payer = #{payer},</if>
  167. <if test="payTime != null">payTime = #{payTime},</if>
  168. <if test="feedBack != null">feedBack = #{feedBack},</if>
  169. <if test="syncTime != null">syncTime = #{syncTime},</if>
  170. <if test="status != null">status = #{status},</if>
  171. </trim>
  172. where id = #{id}
  173. </update>
  174. <delete id="deleteBBusiPaymentOrdersById" parameterType="Long">
  175. delete from b_busi_payment_orders where id = #{id}
  176. </delete>
  177. <delete id="deleteBBusiPaymentOrdersByIds" parameterType="String">
  178. delete from b_busi_payment_orders where id in
  179. <foreach item="id" collection="array" open="(" separator="," close=")">
  180. #{id}
  181. </foreach>
  182. </delete>
  183. </mapper>