You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

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