PaymentMiniProgramConfigMapper.xml 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  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.fs.pay.mapper.PaymentMiniProgramConfigMapper">
  6. <resultMap type="PaymentMiniProgramConfig" id="PaymentMiniProgramConfigResult">
  7. <result property="id" column="id" />
  8. <result property="payType" column="pay_type" />
  9. <result property="appName" column="appname" />
  10. <result property="appid" column="appid" />
  11. <result property="appSecret" column="appsecret" />
  12. <result property="ybMerchantNo" column="yb_merchant_no" />
  13. <result property="ybKey" column="yb_key" />
  14. <result property="ybNotifyUrl" column="yb_notify_url" />
  15. <result property="tzhMerchantNo" column="tzh_merchant_no" />
  16. <result property="tzhAppsecret" column="tzh_appsecret" />
  17. <result property="tzhPrivateKey" column="tzh_private_key" />
  18. <result property="tzhPublicKey" column="tzh_public_key" />
  19. <result property="tzhAppkey" column="tzh_appkey" />
  20. <result property="tzhPayNotifyUrl" column="tzh_pay_notify_url" />
  21. <result property="tzhRefundNotifyUrl" column="tzh_refund_notify_url" />
  22. <result property="tzhSplitNotifyUrl" column="tzh_split_notify_url" />
  23. <result property="wxMerchantNo" column="wx_merchant_no" />
  24. <result property="wxKey" column="wx_key" />
  25. <result property="hfProductNo" column="hf_product_no" />
  26. <result property="hfSystemNo" column="hf_system_no" />
  27. <result property="hfMerchantNo" column="hf_merchant_no" />
  28. <result property="hfPrivateKey" column="hf_private_key" />
  29. <result property="hfPublicKey" column="hf_public_key" />
  30. <result property="hfPayNotifyUrl" column="hf_pay_notify_url" />
  31. <result property="hfLargePayNotifyUrl" column="hf_large_pay_notify_url" />
  32. <result property="hfRefundNotifyUrl" column="hf_refund_notify_url" />
  33. <result property="hfLargeRefundNotifyUrl" column="hf_large_refund_notify_url" />
  34. <result property="status" column="status" />
  35. <result property="createTime" column="create_time" />
  36. <result property="updateTime" column="update_time" />
  37. </resultMap>
  38. <sql id="selectPaymentMiniProgramConfigVo">
  39. select id, pay_type, appid,appname,appsecret, yb_merchant_no, yb_key, yb_notify_url, tzh_merchant_no, tzh_appsecret, tzh_private_key, tzh_public_key, tzh_appkey, tzh_pay_notify_url, tzh_refund_notify_url, tzh_split_notify_url, wx_merchant_no, wx_key, hf_product_no, hf_system_no, hf_merchant_no, hf_private_key, hf_public_key, hf_pay_notify_url, hf_large_pay_notify_url, hf_refund_notify_url, hf_large_refund_notify_url, status, create_time, update_time from payment_mini_program_config
  40. </sql>
  41. <select id="selectPaymentMiniProgramConfigList" parameterType="PaymentMiniProgramConfig" resultMap="PaymentMiniProgramConfigResult">
  42. <include refid="selectPaymentMiniProgramConfigVo"/>
  43. <where>
  44. <if test="payType != null and payType != ''"> and pay_type = #{payType}</if>
  45. <if test="appid != null and appid != ''"> and appid = #{appid}</if>
  46. <if test="ybMerchantNo != null and ybMerchantNo != ''"> and yb_merchant_no = #{ybMerchantNo}</if>
  47. <if test="ybKey != null and ybKey != ''"> and yb_key = #{ybKey}</if>
  48. <if test="ybNotifyUrl != null and ybNotifyUrl != ''"> and yb_notify_url = #{ybNotifyUrl}</if>
  49. <if test="tzhMerchantNo != null and tzhMerchantNo != ''"> and tzh_merchant_no = #{tzhMerchantNo}</if>
  50. <if test="tzhAppsecret != null and tzhAppsecret != ''"> and tzh_appsecret = #{tzhAppsecret}</if>
  51. <if test="tzhPrivateKey != null and tzhPrivateKey != ''"> and tzh_private_key = #{tzhPrivateKey}</if>
  52. <if test="tzhPublicKey != null and tzhPublicKey != ''"> and tzh_public_key = #{tzhPublicKey}</if>
  53. <if test="tzhAppkey != null and tzhAppkey != ''"> and tzh_appkey = #{tzhAppkey}</if>
  54. <if test="tzhPayNotifyUrl != null and tzhPayNotifyUrl != ''"> and tzh_pay_notify_url = #{tzhPayNotifyUrl}</if>
  55. <if test="tzhRefundNotifyUrl != null and tzhRefundNotifyUrl != ''"> and tzh_refund_notify_url = #{tzhRefundNotifyUrl}</if>
  56. <if test="tzhSplitNotifyUrl != null and tzhSplitNotifyUrl != ''"> and tzh_split_notify_url = #{tzhSplitNotifyUrl}</if>
  57. <if test="wxMerchantNo != null and wxMerchantNo != ''"> and wx_merchant_no = #{wxMerchantNo}</if>
  58. <if test="wxKey != null and wxKey != ''"> and wx_key = #{wxKey}</if>
  59. <if test="hfProductNo != null and hfProductNo != ''"> and hf_product_no = #{hfProductNo}</if>
  60. <if test="hfSystemNo != null and hfSystemNo != ''"> and hf_system_no = #{hfSystemNo}</if>
  61. <if test="hfMerchantNo != null and hfMerchantNo != ''"> and hf_merchant_no = #{hfMerchantNo}</if>
  62. <if test="hfPrivateKey != null and hfPrivateKey != ''"> and hf_private_key = #{hfPrivateKey}</if>
  63. <if test="hfPublicKey != null and hfPublicKey != ''"> and hf_public_key = #{hfPublicKey}</if>
  64. <if test="hfPayNotifyUrl != null and hfPayNotifyUrl != ''"> and hf_pay_notify_url = #{hfPayNotifyUrl}</if>
  65. <if test="hfLargePayNotifyUrl != null and hfLargePayNotifyUrl != ''"> and hf_large_pay_notify_url = #{hfLargePayNotifyUrl}</if>
  66. <if test="hfRefundNotifyUrl != null and hfRefundNotifyUrl != ''"> and hf_refund_notify_url = #{hfRefundNotifyUrl}</if>
  67. <if test="hfLargeRefundNotifyUrl != null and hfLargeRefundNotifyUrl != ''"> and hf_large_refund_notify_url = #{hfLargeRefundNotifyUrl}</if>
  68. <if test="status != null "> and status = #{status}</if>
  69. </where>
  70. </select>
  71. <select id="selectPaymentMiniProgramConfigById" parameterType="String" resultMap="PaymentMiniProgramConfigResult">
  72. <include refid="selectPaymentMiniProgramConfigVo"/>
  73. where id = #{id}
  74. </select>
  75. <select id="selectPaymentConfigByAppId" resultType="com.fs.pay.domain.PaymentMiniProgramConfig">
  76. select * from payment_mini_program_config where appid=#{appid} limit 1
  77. </select>
  78. <insert id="insertPaymentMiniProgramConfig" parameterType="PaymentMiniProgramConfig" useGeneratedKeys="true" keyProperty="id">
  79. insert into payment_mini_program_config
  80. <trim prefix="(" suffix=")" suffixOverrides=",">
  81. <if test="payType != null and payType != ''">pay_type,</if>
  82. <if test="appName != null and appName != ''">appname,</if>
  83. <if test="appid != null and appid != ''">appid,</if>
  84. <if test="appSecret != null and appSecret != ''">appsecret,</if>
  85. <if test="ybMerchantNo != null">yb_merchant_no,</if>
  86. <if test="ybKey != null">yb_key,</if>
  87. <if test="ybNotifyUrl != null">yb_notify_url,</if>
  88. <if test="tzhMerchantNo != null">tzh_merchant_no,</if>
  89. <if test="tzhAppsecret != null">tzh_appsecret,</if>
  90. <if test="tzhPrivateKey != null">tzh_private_key,</if>
  91. <if test="tzhPublicKey != null">tzh_public_key,</if>
  92. <if test="tzhAppkey != null">tzh_appkey,</if>
  93. <if test="tzhPayNotifyUrl != null">tzh_pay_notify_url,</if>
  94. <if test="tzhRefundNotifyUrl != null">tzh_refund_notify_url,</if>
  95. <if test="tzhSplitNotifyUrl != null">tzh_split_notify_url,</if>
  96. <if test="wxMerchantNo != null">wx_merchant_no,</if>
  97. <if test="wxKey != null">wx_key,</if>
  98. <if test="hfProductNo != null">hf_product_no,</if>
  99. <if test="hfSystemNo != null">hf_system_no,</if>
  100. <if test="hfMerchantNo != null">hf_merchant_no,</if>
  101. <if test="hfPrivateKey != null">hf_private_key,</if>
  102. <if test="hfPublicKey != null">hf_public_key,</if>
  103. <if test="hfPayNotifyUrl != null">hf_pay_notify_url,</if>
  104. <if test="hfLargePayNotifyUrl != null">hf_large_pay_notify_url,</if>
  105. <if test="hfRefundNotifyUrl != null">hf_refund_notify_url,</if>
  106. <if test="hfLargeRefundNotifyUrl != null">hf_large_refund_notify_url,</if>
  107. <if test="status != null">status,</if>
  108. <if test="createTime != null">create_time,</if>
  109. <if test="updateTime != null">update_time,</if>
  110. </trim>
  111. <trim prefix="values (" suffix=")" suffixOverrides=",">
  112. <if test="payType != null and payType != ''">#{payType},</if>
  113. <if test="appName != null and appName != ''">#{appName},</if>
  114. <if test="appid != null and appid != ''">#{appid},</if>
  115. <if test="appSecret != null and appSecret != ''">#{appSecret},</if>
  116. <if test="ybMerchantNo != null">#{ybMerchantNo},</if>
  117. <if test="ybKey != null">#{ybKey},</if>
  118. <if test="ybNotifyUrl != null">#{ybNotifyUrl},</if>
  119. <if test="tzhMerchantNo != null">#{tzhMerchantNo},</if>
  120. <if test="tzhAppsecret != null">#{tzhAppsecret},</if>
  121. <if test="tzhPrivateKey != null">#{tzhPrivateKey},</if>
  122. <if test="tzhPublicKey != null">#{tzhPublicKey},</if>
  123. <if test="tzhAppkey != null">#{tzhAppkey},</if>
  124. <if test="tzhPayNotifyUrl != null">#{tzhPayNotifyUrl},</if>
  125. <if test="tzhRefundNotifyUrl != null">#{tzhRefundNotifyUrl},</if>
  126. <if test="tzhSplitNotifyUrl != null">#{tzhSplitNotifyUrl},</if>
  127. <if test="wxMerchantNo != null">#{wxMerchantNo},</if>
  128. <if test="wxKey != null">#{wxKey},</if>
  129. <if test="hfProductNo != null">#{hfProductNo},</if>
  130. <if test="hfSystemNo != null">#{hfSystemNo},</if>
  131. <if test="hfMerchantNo != null">#{hfMerchantNo},</if>
  132. <if test="hfPrivateKey != null">#{hfPrivateKey},</if>
  133. <if test="hfPublicKey != null">#{hfPublicKey},</if>
  134. <if test="hfPayNotifyUrl != null">#{hfPayNotifyUrl},</if>
  135. <if test="hfLargePayNotifyUrl != null">#{hfLargePayNotifyUrl},</if>
  136. <if test="hfRefundNotifyUrl != null">#{hfRefundNotifyUrl},</if>
  137. <if test="hfLargeRefundNotifyUrl != null">#{hfLargeRefundNotifyUrl},</if>
  138. <if test="status != null">#{status},</if>
  139. <if test="createTime != null">#{createTime},</if>
  140. <if test="updateTime != null">#{updateTime},</if>
  141. </trim>
  142. </insert>
  143. <update id="updatePaymentMiniProgramConfig" parameterType="PaymentMiniProgramConfig">
  144. update payment_mini_program_config
  145. <trim prefix="SET" suffixOverrides=",">
  146. <if test="payType != null and payType != ''">pay_type = #{payType},</if>
  147. <if test="appName != null and appName != ''">appname = #{appName},</if>
  148. <if test="appid != null and appid != ''">appid = #{appid},</if>
  149. <if test="appSecret != null and appSecret != ''">appsecret = #{appSecret},</if>
  150. <if test="ybMerchantNo != null">yb_merchant_no = #{ybMerchantNo},</if>
  151. <if test="ybKey != null">yb_key = #{ybKey},</if>
  152. <if test="ybNotifyUrl != null">yb_notify_url = #{ybNotifyUrl},</if>
  153. <if test="tzhMerchantNo != null">tzh_merchant_no = #{tzhMerchantNo},</if>
  154. <if test="tzhAppsecret != null">tzh_appsecret = #{tzhAppsecret},</if>
  155. <if test="tzhPrivateKey != null">tzh_private_key = #{tzhPrivateKey},</if>
  156. <if test="tzhPublicKey != null">tzh_public_key = #{tzhPublicKey},</if>
  157. <if test="tzhAppkey != null">tzh_appkey = #{tzhAppkey},</if>
  158. <if test="tzhPayNotifyUrl != null">tzh_pay_notify_url = #{tzhPayNotifyUrl},</if>
  159. <if test="tzhRefundNotifyUrl != null">tzh_refund_notify_url = #{tzhRefundNotifyUrl},</if>
  160. <if test="tzhSplitNotifyUrl != null">tzh_split_notify_url = #{tzhSplitNotifyUrl},</if>
  161. <if test="wxMerchantNo != null">wx_merchant_no = #{wxMerchantNo},</if>
  162. <if test="wxKey != null">wx_key = #{wxKey},</if>
  163. <if test="hfProductNo != null">hf_product_no = #{hfProductNo},</if>
  164. <if test="hfSystemNo != null">hf_system_no = #{hfSystemNo},</if>
  165. <if test="hfMerchantNo != null">hf_merchant_no = #{hfMerchantNo},</if>
  166. <if test="hfPrivateKey != null">hf_private_key = #{hfPrivateKey},</if>
  167. <if test="hfPublicKey != null">hf_public_key = #{hfPublicKey},</if>
  168. <if test="hfPayNotifyUrl != null">hf_pay_notify_url = #{hfPayNotifyUrl},</if>
  169. <if test="hfLargePayNotifyUrl != null">hf_large_pay_notify_url = #{hfLargePayNotifyUrl},</if>
  170. <if test="hfRefundNotifyUrl != null">hf_refund_notify_url = #{hfRefundNotifyUrl},</if>
  171. <if test="hfLargeRefundNotifyUrl != null">hf_large_refund_notify_url = #{hfLargeRefundNotifyUrl},</if>
  172. <if test="status != null">status = #{status},</if>
  173. <if test="createTime != null">create_time = #{createTime},</if>
  174. <if test="updateTime != null">update_time = #{updateTime},</if>
  175. </trim>
  176. where id = #{id}
  177. </update>
  178. <delete id="deletePaymentMiniProgramConfigById" parameterType="String">
  179. delete from payment_mini_program_config where id = #{id}
  180. </delete>
  181. <delete id="deletePaymentMiniProgramConfigByIds" parameterType="String">
  182. delete from payment_mini_program_config where id in
  183. <foreach item="id" collection="array" open="(" separator="," close=")">
  184. #{id}
  185. </foreach>
  186. </delete>
  187. </mapper>