后台服务
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

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