FsHfpayConfigMapper.xml 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  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.his.mapper.FsHfpayConfigMapper">
  6. <resultMap type="FsHfpayConfig" id="FsHfpayConfigResult">
  7. <result property="id" column="id" />
  8. <result property="appId" column="app_id" />
  9. <result property="hfProductId" column="hf_product_id" />
  10. <result property="hfSysId" column="hf_sys_id" />
  11. <result property="huifuId" column="huifu_id" />
  12. <result property="hfPayNotifyUrl" column="hf_pay_notify_url" />
  13. <result property="hfPayOnlineNotifyUrl" column="hf_pay_online_notify_url" />
  14. <result property="hfRefundNotifyUrl" column="hf_refund_notify_url" />
  15. <result property="hfOnlineRefundNotifyUrl" column="hf_online_refund_notify_url" />
  16. <result property="hfRsaPrivateKey" column="hf_rsa_private_key" />
  17. <result property="hfRsaPublicKey" column="hf_rsa_public_key" />
  18. <result property="createTime" column="create_time" />
  19. <result property="updateTime" column="update_time" />
  20. </resultMap>
  21. <sql id="selectFsHfpayConfigVo">
  22. select id, app_id, hf_product_id, hf_sys_id, huifu_id, hf_pay_notify_url, hf_pay_online_notify_url, hf_refund_notify_url, hf_online_refund_notify_url, hf_rsa_private_key, hf_rsa_public_key, create_time, update_time from fs_hfpay_config
  23. </sql>
  24. <!-- <select id="selectFsHfpayConfigList" parameterType="FsHfpayConfig" resultMap="FsHfpayConfigResult">-->
  25. <!-- <include refid="selectFsHfpayConfigVo"/>-->
  26. <!-- <where> -->
  27. <!-- <if test="appId != null and appId != ''"> and app_id = #{appId}</if>-->
  28. <!-- <if test="hfProductId != null and hfProductId != ''"> and hf_product_id = #{hfProductId}</if>-->
  29. <!-- <if test="hfSysId != null and hfSysId != ''"> and hf_sys_id = #{hfSysId}</if>-->
  30. <!-- <if test="huifuId != null and huifuId != ''"> and huifu_id = #{huifuId}</if>-->
  31. <!-- <if test="hfPayNotifyUrl != null and hfPayNotifyUrl != ''"> and hf_pay_notify_url = #{hfPayNotifyUrl}</if>-->
  32. <!-- <if test="hfPayOnlineNotifyUrl != null and hfPayOnlineNotifyUrl != ''"> and hf_pay_online_notify_url = #{hfPayOnlineNotifyUrl}</if>-->
  33. <!-- <if test="hfRefundNotifyUrl != null and hfRefundNotifyUrl != ''"> and hf_refund_notify_url = #{hfRefundNotifyUrl}</if>-->
  34. <!-- <if test="hfOnlineRefundNotifyUrl != null and hfOnlineRefundNotifyUrl != ''"> and hf_online_refund_notify_url = #{hfOnlineRefundNotifyUrl}</if>-->
  35. <!-- <if test="hfRsaPrivateKey != null and hfRsaPrivateKey != ''"> and hf_rsa_private_key = #{hfRsaPrivateKey}</if>-->
  36. <!-- <if test="hfRsaPublicKey != null and hfRsaPublicKey != ''"> and hf_rsa_public_key = #{hfRsaPublicKey}</if>-->
  37. <!-- </where>-->
  38. <!-- </select>-->
  39. <select id="selectFsHfpayConfigList" parameterType="FsHfpayConfig" resultMap="FsHfpayConfigResult">
  40. SELECT
  41. fhc.id,
  42. fhc.app_id,
  43. fcpsc.name as appName,
  44. fhc.hf_product_id,
  45. fhc.hf_sys_id,
  46. fhc.huifu_id,
  47. fhc.hf_pay_notify_url,
  48. fhc.hf_pay_online_notify_url,
  49. fhc.hf_refund_notify_url,
  50. fhc.hf_online_refund_notify_url,
  51. fhc.hf_rsa_private_key,
  52. fhc.hf_rsa_public_key,
  53. fhc.create_time,
  54. fhc.update_time
  55. FROM
  56. fs_hfpay_config fhc
  57. LEFT JOIN fs_course_play_source_config fcpsc ON fcpsc.appid = fhc.app_id
  58. <where>
  59. <if test="appId != null and appId != ''">and fhc.app_id = #{appId}</if>
  60. <if test="hfProductId != null and hfProductId != ''">and fhc.hf_product_id = #{hfProductId}</if>
  61. <if test="hfSysId != null and hfSysId != ''">and fhc.hf_sys_id = #{hfSysId}</if>
  62. <if test="huifuId != null and huifuId != ''">and fhc.huifu_id = #{huifuId}</if>
  63. <if test="hfPayNotifyUrl != null and hfPayNotifyUrl != ''">and fhc.hf_pay_notify_url = #{hfPayNotifyUrl}
  64. </if>
  65. <if test="hfPayOnlineNotifyUrl != null and hfPayOnlineNotifyUrl != ''">and fhc.hf_pay_online_notify_url =
  66. #{hfPayOnlineNotifyUrl}
  67. </if>
  68. <if test="hfRefundNotifyUrl != null and hfRefundNotifyUrl != ''">and fhc.hf_refund_notify_url =
  69. #{hfRefundNotifyUrl}
  70. </if>
  71. <if test="hfOnlineRefundNotifyUrl != null and hfOnlineRefundNotifyUrl != ''">and
  72. fhc.hf_online_refund_notify_url = #{hfOnlineRefundNotifyUrl}
  73. </if>
  74. <if test="hfRsaPrivateKey != null and hfRsaPrivateKey != ''">and fhc.hf_rsa_private_key =
  75. #{hfRsaPrivateKey}
  76. </if>
  77. <if test="hfRsaPublicKey != null and hfRsaPublicKey != ''">and fhc.hf_rsa_public_key = #{hfRsaPublicKey}
  78. </if>
  79. <if test="appName != null and appName != ''">
  80. and fcpsc.name LIKE CONCAT('%', #{appName}, '%')
  81. </if>
  82. </where>
  83. </select>
  84. <select id="selectFsHfpayConfigById" parameterType="Long" resultMap="FsHfpayConfigResult">
  85. <include refid="selectFsHfpayConfigVo"/>
  86. where id = #{id}
  87. </select>
  88. <insert id="insertFsHfpayConfig" parameterType="FsHfpayConfig">
  89. insert into fs_hfpay_config
  90. <trim prefix="(" suffix=")" suffixOverrides=",">
  91. <if test="id != null">id,</if>
  92. <if test="appId != null">app_id,</if>
  93. <if test="hfProductId != null">hf_product_id,</if>
  94. <if test="hfSysId != null">hf_sys_id,</if>
  95. <if test="huifuId != null">huifu_id,</if>
  96. <if test="hfPayNotifyUrl != null">hf_pay_notify_url,</if>
  97. <if test="hfPayOnlineNotifyUrl != null">hf_pay_online_notify_url,</if>
  98. <if test="hfRefundNotifyUrl != null">hf_refund_notify_url,</if>
  99. <if test="hfOnlineRefundNotifyUrl != null">hf_online_refund_notify_url,</if>
  100. <if test="hfRsaPrivateKey != null">hf_rsa_private_key,</if>
  101. <if test="hfRsaPublicKey != null">hf_rsa_public_key,</if>
  102. <if test="createTime != null">create_time,</if>
  103. <if test="updateTime != null">update_time,</if>
  104. </trim>
  105. <trim prefix="values (" suffix=")" suffixOverrides=",">
  106. <if test="id != null">#{id},</if>
  107. <if test="appId != null">#{appId},</if>
  108. <if test="hfProductId != null">#{hfProductId},</if>
  109. <if test="hfSysId != null">#{hfSysId},</if>
  110. <if test="huifuId != null">#{huifuId},</if>
  111. <if test="hfPayNotifyUrl != null">#{hfPayNotifyUrl},</if>
  112. <if test="hfPayOnlineNotifyUrl != null">#{hfPayOnlineNotifyUrl},</if>
  113. <if test="hfRefundNotifyUrl != null">#{hfRefundNotifyUrl},</if>
  114. <if test="hfOnlineRefundNotifyUrl != null">#{hfOnlineRefundNotifyUrl},</if>
  115. <if test="hfRsaPrivateKey != null">#{hfRsaPrivateKey},</if>
  116. <if test="hfRsaPublicKey != null">#{hfRsaPublicKey},</if>
  117. <if test="createTime != null">#{createTime},</if>
  118. <if test="updateTime != null">#{updateTime},</if>
  119. </trim>
  120. </insert>
  121. <update id="updateFsHfpayConfig" parameterType="FsHfpayConfig">
  122. update fs_hfpay_config
  123. <trim prefix="SET" suffixOverrides=",">
  124. <if test="appId != null">app_id = #{appId},</if>
  125. <if test="hfProductId != null">hf_product_id = #{hfProductId},</if>
  126. <if test="hfSysId != null">hf_sys_id = #{hfSysId},</if>
  127. <if test="huifuId != null">huifu_id = #{huifuId},</if>
  128. <if test="hfPayNotifyUrl != null">hf_pay_notify_url = #{hfPayNotifyUrl},</if>
  129. <if test="hfPayOnlineNotifyUrl != null">hf_pay_online_notify_url = #{hfPayOnlineNotifyUrl},</if>
  130. <if test="hfRefundNotifyUrl != null">hf_refund_notify_url = #{hfRefundNotifyUrl},</if>
  131. <if test="hfOnlineRefundNotifyUrl != null">hf_online_refund_notify_url = #{hfOnlineRefundNotifyUrl},</if>
  132. <if test="hfRsaPrivateKey != null">hf_rsa_private_key = #{hfRsaPrivateKey},</if>
  133. <if test="hfRsaPublicKey != null">hf_rsa_public_key = #{hfRsaPublicKey},</if>
  134. <if test="createTime != null">create_time = #{createTime},</if>
  135. <if test="updateTime != null">update_time = #{updateTime},</if>
  136. </trim>
  137. where id = #{id}
  138. </update>
  139. <delete id="deleteFsHfpayConfigById" parameterType="Long">
  140. delete from fs_hfpay_config where id = #{id}
  141. </delete>
  142. <delete id="deleteFsHfpayConfigByIds" parameterType="String">
  143. delete from fs_hfpay_config where id in
  144. <foreach item="id" collection="array" open="(" separator="," close=")">
  145. #{id}
  146. </foreach>
  147. </delete>
  148. </mapper>