Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 
 
 

104 lignes
4.4 KiB

  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.iformall.mapper.WxPayAccountMapper">
  4. <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxPayAccount">
  5. <id column="id" jdbcType="BIGINT" property="id"/>
  6. <result column="tenant_id" jdbcType="VARCHAR" property="tenantId" />
  7. <result column="parent_tenant_id" jdbcType="VARCHAR" property="parentTenantId" />
  8. <result column="mch_id" jdbcType="VARCHAR" property="mchId"/>
  9. <result column="sub_mch_id" jdbcType="VARCHAR" property="subMchId"/>
  10. <result column="sub_app_id" jdbcType="VARCHAR" property="subAppId"/>
  11. <result column="api_key" jdbcType="VARCHAR" property="apiKey"/>
  12. <result column="merchant_api_key" jdbcType="VARCHAR" property="merchantApiKey"/>
  13. <result column="merchant_key_path" jdbcType="VARCHAR" property="merchantKeyPath"/>
  14. <result column="merchant_apiv3_key" jdbcType="VARCHAR" property="merchantApiv3Key"/>
  15. <result column="notify_url" jdbcType="VARCHAR" property="notifyUrl"/>
  16. <result column="notify_token" jdbcType="VARCHAR" property="notifyToken"/>
  17. <result column="cert_path" jdbcType="VARCHAR" property="certPath"/>
  18. <result column="merchant_cert_path" jdbcType="VARCHAR" property="merchantCertPath"/>
  19. <result column="type" jdbcType="INTEGER" property="type"/>
  20. <result column="share" jdbcType="INTEGER" property="share"/>
  21. <result column="rate" jdbcType="INTEGER" property="rate"/>
  22. <result column="real_rate" jdbcType="INTEGER" property="realRate"/>
  23. <result column="service_id" jdbcType="VARCHAR" property="serviceId"/>
  24. <result column="pay_score_notify_url" jdbcType="VARCHAR" property="payScoreNotifyUrl"/>
  25. <result column="api_v3_key" jdbcType="VARCHAR" property="apiV3Key"/>
  26. <result column="cert_serial_no" jdbcType="VARCHAR" property="certSerialNo"/>
  27. <result column="private_key_path" jdbcType="VARCHAR" property="privateKeyPath"/>
  28. <result column="private_cert_path" jdbcType="VARCHAR" property="privateCertPath"/>
  29. </resultMap>
  30. <sql id="allColumns">
  31. `id`,`tenant_id`,`parent_tenant_id`,`mch_id`,`sub_mch_id`,`sub_app_id`,`api_key`,`merchant_api_key`,`notify_url`,`notify_token`,`cert_path`,
  32. `merchant_cert_path`,`type`,`share`,`rate`,`real_rate`,
  33. `service_id`,`pay_score_notify_url`,`api_v3_key`,`cert_serial_no`,`private_key_path`,`private_cert_path`,`merchant_key_path`,`merchant_apiv3_key`
  34. </sql>
  35. <sql id="dynamicWhereConditions">
  36. where 1 = 1
  37. <if test=" null != tenantId and '' != tenantId">
  38. and `tenant_id` = #{tenantId}
  39. </if>
  40. <if test=" null != parentTenantId and '' != parentTenantId">
  41. and `parent_tenant_id` = #{parentTenantId}
  42. </if>
  43. <if test=" null != mchId ">
  44. and `mch_id` = #{mchId}
  45. </if>
  46. <if test=" null != subMchId ">
  47. and `sub_mch_id` = #{subMchId}
  48. </if>
  49. <if test=" null != apiKey ">
  50. and `api_key` like concat('%', #{apiKey},'%')
  51. </if>
  52. <if test=" null != notifyUrl ">
  53. and `notify_url` like concat('%', #{notifyUrl},'%')
  54. </if>
  55. <if test=" null != certPath ">
  56. and `cert_path` like concat('%', #{certPath},'%')
  57. </if>
  58. <if test=" null != type ">
  59. and `type` = #{type}
  60. </if>
  61. <if test=" null != share ">
  62. and `share` = #{share}
  63. </if>
  64. <if test=" null != rate ">
  65. and `rate` = #{rate}
  66. </if>
  67. <if test=" null != realRate ">
  68. and `real_rate` = #{realRate}
  69. </if>
  70. <if test=" null != ids ">
  71. and id in
  72. <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
  73. #{idItem}
  74. </foreach>
  75. </if>
  76. <if test=" null != sortColumns">order by ${sortColumns}</if>
  77. </sql>
  78. <select id="findList" parameterType="com.iformall.domain.po.WxPayAccount" resultMap="BaseResultMap">
  79. select
  80. <include refid="allColumns"/>
  81. from wx_pay_account
  82. <include refid="dynamicWhereConditions"/>
  83. </select>
  84. <select id="getByTenantId" resultMap="BaseResultMap">
  85. select
  86. <include refid="allColumns"/>
  87. from wx_pay_account where `tenant_id` = #{tenantId}
  88. </select>
  89. </mapper>