Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 
 
 
 

153 wiersze
4.9 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.WxProfitSharingReceiverMapper">
  4. <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxProfitSharingReceiver">
  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="merchant_id" jdbcType="BIGINT" property="merchantId" />
  9. <result column="receiver_type" jdbcType="INTEGER" property="receiverType" />
  10. <result column="receiver_account" jdbcType="VARCHAR" property="receiverAccount" />
  11. <result column="receiver_comments" jdbcType="VARCHAR" property="receiverComments" />
  12. <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
  13. <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
  14. <result column="sharing_type" jdbcType="INTEGER" property="sharingType" />
  15. <result column="bank_no" jdbcType="VARCHAR" property="bankNo" />
  16. <result column="true_name" jdbcType="VARCHAR" property="trueName" />
  17. <result column="bank_code" jdbcType="VARCHAR" property="bankCode" />
  18. <result column="status" jdbcType="INTEGER" property="status" />
  19. <result column="parameter" jdbcType="VARCHAR" property="parameter" />
  20. <result column="plat" jdbcType="INTEGER" property="plat" />
  21. <result column="tt_import_status" jdbcType="VARCHAR" property="ttImportStatus" />
  22. <result column="tt_import_url" jdbcType="VARCHAR" property="ttImportUrl" />
  23. <result column="tt_balance_url" jdbcType="VARCHAR" property="ttBalanceUrl" />
  24. </resultMap>
  25. <sql id="allColumns">
  26. `id`,`tenant_id`,`parent_tenant_id`,`merchant_id`,`receiver_type`,`receiver_account`,`receiver_comments`,`create_time`,`update_time`,`sharing_type`,`bank_no`,`true_name`,`bank_code`,`status`,`parameter`,`plat`,`is_use`
  27. ,`tt_import_status`,`tt_import_url`,`tt_balance_url`
  28. </sql>
  29. <sql id="dynamicWhereConditions">
  30. where 1 = 1
  31. <if test=" null != id ">
  32. and `id` = #{id}
  33. </if>
  34. <if test=" null != tenantId and '' != tenantId">
  35. and `tenant_id` = #{tenantId}
  36. </if>
  37. <if test=" null != parentTenantId and '' != parentTenantId">
  38. and `parent_tenant_id` = #{parentTenantId}
  39. </if>
  40. <if test=" null != merchantId ">
  41. and `merchant_id` = #{merchantId}
  42. </if>
  43. <if test=" null != receiverType ">
  44. and `receiver_type` = #{receiverType}
  45. </if>
  46. <if test=" null != receiverAccount ">
  47. and `receiver_account` like concat('%', #{receiverAccount},'%')
  48. </if>
  49. <if test=" null != receiverComments ">
  50. and `receiver_comments` like concat('%', #{receiverComments},'%')
  51. </if>
  52. <if test=" null != createTime ">
  53. and `create_time` = #{createTime}
  54. </if>
  55. <if test=" null != updateTime ">
  56. and `update_time` = #{updateTime}
  57. </if>
  58. <if test=" null != sharingType ">
  59. and `sharing_type` = #{sharingType}
  60. </if>
  61. <if test=" null != bankNo ">
  62. and `bank_no` like concat('%', #{bankNo},'%')
  63. </if>
  64. <if test=" null != trueName ">
  65. and `true_name` like concat('%', #{trueName},'%')
  66. </if>
  67. <if test=" null != bankCode ">
  68. and `bank_code` like concat('%', #{bankCode},'%')
  69. </if>
  70. <if test=" null != status ">
  71. and `status` = #{status}
  72. </if>
  73. <if test=" null != plat ">
  74. and `plat` = #{plat}
  75. </if>
  76. <if test=" null !=isUse ">
  77. and `is_use` = #{isUse}
  78. </if>
  79. <if test=" null != wxImportStatus">
  80. and `tt_import_status` -> '$.wx' = #{wxImportStatus}
  81. </if>
  82. <if test=" null != alipayImportStatus">
  83. and `tt_import_status` -> '$.alipay' = #{alipayImportStatus}
  84. </if>
  85. <if test=" null != hzImportStatus">
  86. and `tt_import_status` -> '$.hz' = #{hzImportStatus}
  87. </if>
  88. <if test=" null != ids ">
  89. and id in
  90. <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
  91. #{idItem}
  92. </foreach>
  93. </if>
  94. <if test=" null != sortColumns"> order by ${sortColumns} </if>
  95. </sql>
  96. <select id="findList" parameterType="com.iformall.domain.po.WxProfitSharingReceiver" resultMap="BaseResultMap">
  97. select
  98. <include refid="allColumns"/>
  99. from wx_profit_sharing_receiver
  100. <include refid="dynamicWhereConditions"/>
  101. </select>
  102. <select id="findOne" parameterType="com.iformall.domain.po.WxProfitSharingReceiver" resultMap="BaseResultMap">
  103. select
  104. <include refid="allColumns"/>
  105. from wx_profit_sharing_receiver
  106. <include refid="dynamicWhereConditions"/>
  107. limit 0,1
  108. </select>
  109. <select id="findMerchantIdList" parameterType="com.iformall.domain.po.WxProfitSharingReceiver" resultType="Long">
  110. select `merchant_id`
  111. from wx_profit_sharing_receiver
  112. <include refid="dynamicWhereConditions"/>
  113. </select>
  114. </mapper>