Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
 
 
 
 
 

98 строки
3.7 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.WxPayAccountBillMapper">
  4. <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxPayAccountBill">
  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="api_key" jdbcType="VARCHAR" property="apiKey"/>
  11. <result column="notify_url" jdbcType="VARCHAR" property="notifyUrl"/>
  12. <result column="cert_path" jdbcType="VARCHAR" property="certPath"/>
  13. <result column="type" jdbcType="INTEGER" property="type"/>
  14. <result column="share" jdbcType="INTEGER" property="share"/>
  15. <result column="rate" jdbcType="INTEGER" property="rate"/>
  16. <result column="real_rate" jdbcType="INTEGER" property="realRate"/>
  17. <result column="bank_account_name" jdbcType="VARCHAR" property="bankAccountName"/>
  18. <result column="bank_card_id" jdbcType="VARCHAR" property="bankCardId"/>
  19. <result column="social_credit_code" jdbcType="VARCHAR" property="socialCreditCode"/>
  20. <result column="bank_name" jdbcType="VARCHAR" property="bankName"/>
  21. <result column="service_charge_rate" property="serviceChargeRate"/>
  22. </resultMap>
  23. <sql id="allColumns">
  24. `id`,`tenant_id`,`parent_tenant_id`,`mch_id`,`sub_mch_id`,`api_key`,`notify_url`,`cert_path`,
  25. `type`,`share`,`rate`,`real_rate`,`service_charge_rate`
  26. </sql>
  27. <sql id="dynamicWhereConditions">
  28. where 1 = 1
  29. <if test=" null != id ">
  30. and `id` = #{id}
  31. </if>
  32. <if test=" null != tenantId and '' != tenantId">
  33. and `tenant_id` = #{tenantId}
  34. </if>
  35. <if test=" null != parentTenantId and '' != parentTenantId">
  36. and `parent_tenant_id` = #{parentTenantId}
  37. </if>
  38. <if test=" null != mchId ">
  39. and `mch_id` = #{mchId}
  40. </if>
  41. <if test=" null != subMchId ">
  42. and `sub_mch_id` = #{subMchId}
  43. </if>
  44. <if test=" null != apiKey ">
  45. and `api_key` like concat('%', #{apiKey},'%')
  46. </if>
  47. <if test=" null != notifyUrl ">
  48. and `notify_url` like concat('%', #{notifyUrl},'%')
  49. </if>
  50. <if test=" null != certPath ">
  51. and `cert_path` like concat('%', #{certPath},'%')
  52. </if>
  53. <if test=" null != type ">
  54. and `type` = #{type}
  55. </if>
  56. <if test=" null != share ">
  57. and `share` = #{share}
  58. </if>
  59. <if test=" null != rate ">
  60. and `rate` = #{rate}
  61. </if>
  62. <if test=" null != realRate ">
  63. and `real_rate` = #{realRate}
  64. </if>
  65. <if test=" null != ids ">
  66. and id in
  67. <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
  68. #{idItem}
  69. </foreach>
  70. </if>
  71. <if test=" null != sortColumns">order by ${sortColumns}</if>
  72. </sql>
  73. <select id="findList" parameterType="com.iformall.domain.po.WxPayAccountBill" resultMap="BaseResultMap">
  74. select
  75. <include refid="allColumns"/>
  76. from wx_pay_account_bill
  77. <include refid="dynamicWhereConditions"/>
  78. </select>
  79. <select id="getByTenantId" resultMap="BaseResultMap">
  80. select
  81. <include refid="allColumns"/>
  82. from wx_pay_account_bill where `tenant_id` = #{tenantId}
  83. </select>
  84. </mapper>