No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 
 
 
 

104 líneas
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.WxProfitPaymentReceiverMapper">
  4. <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxProfitPaymentReceiver">
  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="receiver_params" jdbcType="VARCHAR" property="receiverParams" />
  13. <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
  14. <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
  15. <result column="status" jdbcType="INTEGER" property="status" />
  16. <result column="plat" jdbcType="INTEGER" property="plat" />
  17. <result column="tt_import_status" jdbcType="VARCHAR" property="ttImportStatus" />
  18. <result column="tt_import_url" jdbcType="VARCHAR" property="ttImportUrl" />
  19. <result column="tt_balance_url" jdbcType="VARCHAR" property="ttBalanceUrl" />
  20. </resultMap>
  21. <sql id="allColumns">
  22. `id`,`tenant_id`,`parent_tenant_id`,`merchant_id`,
  23. `receiver_type`,`receiver_account`,`receiver_comments`,`receiver_params`,
  24. `create_time`,`update_time`,`status`,`plat`,
  25. `tt_import_status`,`tt_import_url`,`tt_balance_url`
  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 != merchantId ">
  39. and `merchant_id` = #{merchantId}
  40. </if>
  41. <if test=" null != receiverType ">
  42. and `receiver_type` = #{receiverType}
  43. </if>
  44. <if test=" null != receiverAccount and '' != receiverAccount ">
  45. and `receiver_account` like concat('%', #{receiverAccount},'%')
  46. </if>
  47. <if test=" null != receiverComments ">
  48. and `receiver_comments` like concat('%', #{receiverComments},'%')
  49. </if>
  50. <if test=" null != status ">
  51. and `status` = #{status}
  52. </if>
  53. <if test=" null != plat ">
  54. and `plat` = #{plat}
  55. </if>
  56. <if test=" null != wxImportStatus">
  57. and `tt_import_status` -> '$.wx' = #{wxImportStatus}
  58. </if>
  59. <if test=" null != alipayImportStatus">
  60. and `tt_import_status` -> '$.alipay' = #{alipayImportStatus}
  61. </if>
  62. <if test=" null != hzImportStatus">
  63. and `tt_import_status` -> '$.hz' = #{hzImportStatus}
  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.WxProfitPaymentReceiver" resultMap="BaseResultMap">
  74. select
  75. <include refid="allColumns"/>
  76. from wx_profit_payment_receiver
  77. <include refid="dynamicWhereConditions"/>
  78. </select>
  79. <select id="findOne" parameterType="com.iformall.domain.po.WxProfitPaymentReceiver" resultMap="BaseResultMap">
  80. select
  81. <include refid="allColumns"/>
  82. from wx_profit_payment_receiver
  83. <include refid="dynamicWhereConditions"/>
  84. limit 0,1
  85. </select>
  86. </mapper>