1
0

MerchPayCfgMapper.xml 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  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.emato.cuspay.dao.mapper.merch.MerchPayCfgMapper" >
  4. <resultMap id="BaseResultMap" type="com.emato.cuspay.dto.merch.MerchPayCfg" >
  5. <id column="pay_cfg_sn" property="payCfgSn" jdbcType="VARCHAR" />
  6. <result column="merch_sn" property="merchSn" jdbcType="VARCHAR" />
  7. <result column="merch_wx_api_key" property="merchWxApiKey" jdbcType="VARCHAR" />
  8. <result column="notify_url" property="notifyUrl" jdbcType="VARCHAR" />
  9. <result column="pay_chnl_flag" property="payChnlFlag" jdbcType="VARCHAR" />
  10. <result column="is_valid" property="isValid" jdbcType="CHAR" />
  11. <result column="remark" property="remark" jdbcType="VARCHAR" />
  12. <result column="creater_sn" property="createrSn" jdbcType="VARCHAR" />
  13. <result column="create_time" property="createTime" jdbcType="VARCHAR" />
  14. <result column="moder_sn" property="moderSn" jdbcType="VARCHAR" />
  15. <result column="mod_time" property="modTime" jdbcType="VARCHAR" />
  16. <result column="tstm" property="tstm" jdbcType="TIMESTAMP" />
  17. </resultMap>
  18. <sql id="Base_Column_List" >
  19. pay_cfg_sn, merch_sn, merch_wx_api_key, notify_url, pay_chnl_flag, is_valid, remark, creater_sn, create_time, moder_sn,
  20. mod_time, tstm
  21. </sql>
  22. <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
  23. select
  24. <include refid="Base_Column_List" />
  25. from merch_pay_cfg
  26. where pay_cfg_sn = #{payCfgSn,jdbcType=VARCHAR}
  27. </select>
  28. <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
  29. delete from merch_pay_cfg
  30. where pay_cfg_sn = #{payCfgSn,jdbcType=VARCHAR}
  31. </delete>
  32. <insert id="insertSelective" parameterType="com.emato.cuspay.dto.merch.MerchPayCfg" >
  33. insert into merch_pay_cfg
  34. <trim prefix="(" suffix=")" suffixOverrides="," >
  35. <if test="payCfgSn != null" >
  36. pay_cfg_sn,
  37. </if>
  38. <if test="merchSn != null" >
  39. merch_sn,
  40. </if>
  41. <if test="merchWxApiKey != null" >
  42. merch_wx_api_key,
  43. </if>
  44. <if test="notifyUrl != null">
  45. notify_url,
  46. </if>
  47. <if test="payChnlFlag != null" >
  48. pay_chnl_flag,
  49. </if>
  50. <if test="isValid != null" >
  51. is_valid,
  52. </if>
  53. <if test="remark != null" >
  54. remark,
  55. </if>
  56. <if test="createrSn != null" >
  57. creater_sn,
  58. </if>
  59. <if test="createTime != null" >
  60. create_time,
  61. </if>
  62. <if test="moderSn != null" >
  63. moder_sn,
  64. </if>
  65. <if test="modTime != null" >
  66. mod_time,
  67. </if>
  68. <if test="tstm != null" >
  69. tstm,
  70. </if>
  71. </trim>
  72. <trim prefix="values (" suffix=")" suffixOverrides="," >
  73. <if test="payCfgSn != null" >
  74. #{payCfgSn,jdbcType=VARCHAR},
  75. </if>
  76. <if test="merchSn != null" >
  77. #{merchSn,jdbcType=VARCHAR},
  78. </if>
  79. <if test="merchWxApiKey != null" >
  80. #{merchWxApiKey,jdbcType=VARCHAR},
  81. </if>
  82. <if test="notifyUrl != null">
  83. #{notifyUrl,jdbcType=VARCHAR},
  84. </if>
  85. <if test="payChnlFlag != null" >
  86. #{payChnlFlag,jdbcType=VARCHAR},
  87. </if>
  88. <if test="isValid != null" >
  89. #{isValid,jdbcType=CHAR},
  90. </if>
  91. <if test="remark != null" >
  92. #{remark,jdbcType=VARCHAR},
  93. </if>
  94. <if test="createrSn != null" >
  95. #{createrSn,jdbcType=VARCHAR},
  96. </if>
  97. <if test="createTime != null" >
  98. #{createTime,jdbcType=VARCHAR},
  99. </if>
  100. <if test="moderSn != null" >
  101. #{moderSn,jdbcType=VARCHAR},
  102. </if>
  103. <if test="modTime != null" >
  104. #{modTime,jdbcType=VARCHAR},
  105. </if>
  106. <if test="tstm != null" >
  107. #{tstm,jdbcType=TIMESTAMP},
  108. </if>
  109. </trim>
  110. </insert>
  111. <update id="updateByPrimaryKeySelective" parameterType="com.emato.cuspay.dto.merch.MerchPayCfg" >
  112. update merch_pay_cfg
  113. <set >
  114. <if test="merchSn != null" >
  115. merch_sn = #{merchSn,jdbcType=VARCHAR},
  116. </if>
  117. <if test="merchWxApiKey != null" >
  118. merch_wx_api_key = #{merchWxApiKey,jdbcType=VARCHAR},
  119. </if>
  120. <if test="notify_url != null">
  121. notify_url = #{notifyUrl, jdbcType=VARCHAR},
  122. </if>
  123. <if test="payChnlFlag != null" >
  124. pay_chnl_flag = #{payChnlFlag,jdbcType=VARCHAR},
  125. </if>
  126. <if test="isValid != null" >
  127. is_valid = #{isValid,jdbcType=CHAR},
  128. </if>
  129. <if test="remark != null" >
  130. remark = #{remark,jdbcType=VARCHAR},
  131. </if>
  132. <if test="createrSn != null" >
  133. creater_sn = #{createrSn,jdbcType=VARCHAR},
  134. </if>
  135. <if test="createTime != null" >
  136. create_time = #{createTime,jdbcType=VARCHAR},
  137. </if>
  138. <if test="moderSn != null" >
  139. moder_sn = #{moderSn,jdbcType=VARCHAR},
  140. </if>
  141. <if test="modTime != null" >
  142. mod_time = #{modTime,jdbcType=VARCHAR},
  143. </if>
  144. <if test="tstm != null" >
  145. tstm = #{tstm,jdbcType=TIMESTAMP},
  146. </if>
  147. </set>
  148. where pay_cfg_sn = #{payCfgSn,jdbcType=VARCHAR}
  149. </update>
  150. <select id="selectByWxMercherSn" resultMap="BaseResultMap" parameterType="java.lang.String">
  151. SELECT
  152. <include refid="Base_Column_List" />
  153. FROM merch_pay_cfg WHERE merch_sn = #{merchSn} AND pay_chnl_flag = "weixin"
  154. </select>
  155. <select id="selectMerchPayCfg" resultMap="BaseResultMap">
  156. SELECT
  157. <include refid="Base_Column_List"/>
  158. FROM merch_pay_cfg
  159. </select>
  160. <select id="getMerchPayCfgByMerchsnAndChnlFlag" resultMap="BaseResultMap" parameterType="com.emato.cuspay.dto.merch.MerchPayCfg">
  161. SELECT
  162. <include refid="Base_Column_List" />
  163. FROM merch_pay_cfg WHERE merch_sn = #{merchSn} AND pay_chnl_flag = #{payChnlFlag}
  164. </select>
  165. <select id="getMerchPayCfgByMerchsn" resultMap="BaseResultMap" parameterType="java.lang.String">
  166. SELECT
  167. <include refid="Base_Column_List" />
  168. FROM merch_pay_cfg WHERE merch_sn = #{merchSn}
  169. </select>
  170. </mapper>