AppChargeChannelMapper.xml 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  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.game.business.mapper.AppChargeChannelMapper">
  6. <resultMap type="com.game.business.domain.AppChargeChannel" id="AppChargeChannelResult">
  7. <result property="id" column="id" />
  8. <result property="name" column="name" />
  9. <result property="channelKey" column="channel_key" />
  10. <result property="rate" column="rate" />
  11. <result property="logoUrl" column="logo_url" />
  12. <result property="company" column="company" />
  13. <result property="appId" column="app_id" />
  14. <result property="appSecret" column="app_secret" />
  15. <result property="thirdUrl" column="third_url" />
  16. <result property="status" column="status" />
  17. <result property="certPath" column="cert_path" />
  18. <result property="aliPublicCert" column="ali_public_cert" />
  19. <result property="aliApplyCert" column="ali_apply_cert" />
  20. <result property="aliCaCert" column="ali_ca_cert" />
  21. <result property="merchantNo" column="merchant_no" />
  22. <result property="apiSecret" column="api_secret" />
  23. <result property="orderno" column="orderno" />
  24. </resultMap>
  25. <sql id="selectAppChargeChannelVo">
  26. select id, name, channel_key, rate, logo_url, company, app_id, app_secret, third_url, status, cert_path, ali_public_cert, ali_apply_cert, ali_ca_cert, merchant_no, api_secret, orderno from app_charge_channel
  27. </sql>
  28. <select id="selectAppChargeChannelList" parameterType="com.game.business.domain.AppChargeChannel" resultMap="AppChargeChannelResult">
  29. <include refid="selectAppChargeChannelVo"/>
  30. <where>
  31. <if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
  32. <if test="channelKey != null and channelKey != ''"> and channel_key = #{channelKey}</if>
  33. <if test="rate != null "> and rate = #{rate}</if>
  34. <if test="logoUrl != null and logoUrl != ''"> and logo_url = #{logoUrl}</if>
  35. <if test="company != null and company != ''"> and company = #{company}</if>
  36. <if test="appId != null and appId != ''"> and app_id = #{appId}</if>
  37. <if test="appSecret != null and appSecret != ''"> and app_secret = #{appSecret}</if>
  38. <if test="thirdUrl != null and thirdUrl != ''"> and third_url = #{thirdUrl}</if>
  39. <if test="status != null "> and status = #{status}</if>
  40. <if test="certPath != null and certPath != ''"> and cert_path = #{certPath}</if>
  41. <if test="aliPublicCert != null and aliPublicCert != ''"> and ali_public_cert = #{aliPublicCert}</if>
  42. <if test="aliApplyCert != null and aliApplyCert != ''"> and ali_apply_cert = #{aliApplyCert}</if>
  43. <if test="aliCaCert != null and aliCaCert != ''"> and ali_ca_cert = #{aliCaCert}</if>
  44. <if test="merchantNo != null and merchantNo != ''"> and merchant_no = #{merchantNo}</if>
  45. <if test="apiSecret != null and apiSecret != ''"> and api_secret = #{apiSecret}</if>
  46. <if test="orderno != null "> and orderno = #{orderno}</if>
  47. </where>
  48. </select>
  49. <select id="selectAppChargeChannelById" parameterType="Long" resultMap="AppChargeChannelResult">
  50. <include refid="selectAppChargeChannelVo"/>
  51. where id = #{id}
  52. </select>
  53. <insert id="insertAppChargeChannel" parameterType="com.game.business.domain.AppChargeChannel">
  54. insert into app_charge_channel
  55. <trim prefix="(" suffix=")" suffixOverrides=",">
  56. <if test="id != null">id,</if>
  57. <if test="name != null">name,</if>
  58. <if test="channelKey != null">channel_key,</if>
  59. <if test="rate != null">rate,</if>
  60. <if test="logoUrl != null">logo_url,</if>
  61. <if test="company != null">company,</if>
  62. <if test="appId != null">app_id,</if>
  63. <if test="appSecret != null">app_secret,</if>
  64. <if test="thirdUrl != null">third_url,</if>
  65. <if test="status != null">status,</if>
  66. <if test="certPath != null">cert_path,</if>
  67. <if test="aliPublicCert != null">ali_public_cert,</if>
  68. <if test="aliApplyCert != null">ali_apply_cert,</if>
  69. <if test="aliCaCert != null">ali_ca_cert,</if>
  70. <if test="merchantNo != null">merchant_no,</if>
  71. <if test="apiSecret != null">api_secret,</if>
  72. <if test="orderno != null">orderno,</if>
  73. </trim>
  74. <trim prefix="values (" suffix=")" suffixOverrides=",">
  75. <if test="id != null">#{id},</if>
  76. <if test="name != null">#{name},</if>
  77. <if test="channelKey != null">#{channelKey},</if>
  78. <if test="rate != null">#{rate},</if>
  79. <if test="logoUrl != null">#{logoUrl},</if>
  80. <if test="company != null">#{company},</if>
  81. <if test="appId != null">#{appId},</if>
  82. <if test="appSecret != null">#{appSecret},</if>
  83. <if test="thirdUrl != null">#{thirdUrl},</if>
  84. <if test="status != null">#{status},</if>
  85. <if test="certPath != null">#{certPath},</if>
  86. <if test="aliPublicCert != null">#{aliPublicCert},</if>
  87. <if test="aliApplyCert != null">#{aliApplyCert},</if>
  88. <if test="aliCaCert != null">#{aliCaCert},</if>
  89. <if test="merchantNo != null">#{merchantNo},</if>
  90. <if test="apiSecret != null">#{apiSecret},</if>
  91. <if test="orderno != null">#{orderno},</if>
  92. </trim>
  93. </insert>
  94. <update id="updateAppChargeChannel" parameterType="com.game.business.domain.AppChargeChannel">
  95. update app_charge_channel
  96. <trim prefix="SET" suffixOverrides=",">
  97. <if test="name != null">name = #{name},</if>
  98. <if test="channelKey != null">channel_key = #{channelKey},</if>
  99. <if test="rate != null">rate = #{rate},</if>
  100. <if test="logoUrl != null">logo_url = #{logoUrl},</if>
  101. <if test="company != null">company = #{company},</if>
  102. <if test="appId != null">app_id = #{appId},</if>
  103. <if test="appSecret != null">app_secret = #{appSecret},</if>
  104. <if test="thirdUrl != null">third_url = #{thirdUrl},</if>
  105. <if test="status != null">status = #{status},</if>
  106. <if test="certPath != null">cert_path = #{certPath},</if>
  107. <if test="aliPublicCert != null">ali_public_cert = #{aliPublicCert},</if>
  108. <if test="aliApplyCert != null">ali_apply_cert = #{aliApplyCert},</if>
  109. <if test="aliCaCert != null">ali_ca_cert = #{aliCaCert},</if>
  110. <if test="merchantNo != null">merchant_no = #{merchantNo},</if>
  111. <if test="apiSecret != null">api_secret = #{apiSecret},</if>
  112. <if test="orderno != null">orderno = #{orderno},</if>
  113. </trim>
  114. where id = #{id}
  115. </update>
  116. <delete id="deleteAppChargeChannelById" parameterType="Long">
  117. delete from app_charge_channel where id = #{id}
  118. </delete>
  119. <delete id="deleteAppChargeChannelByIds" parameterType="String">
  120. delete from app_charge_channel where id in
  121. <foreach item="id" collection="array" open="(" separator="," close=")">
  122. #{id}
  123. </foreach>
  124. </delete>
  125. </mapper>