|
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
- <mapper namespace="com.iformall.mapper.WxProfitPaymentReceiverMapper">
- <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxProfitPaymentReceiver">
- <id column="id" jdbcType="BIGINT" property="id" />
- <result column="tenant_id" jdbcType="VARCHAR" property="tenantId" />
- <result column="parent_tenant_id" jdbcType="VARCHAR" property="parentTenantId"/>
- <result column="merchant_id" jdbcType="BIGINT" property="merchantId" />
- <result column="receiver_type" jdbcType="INTEGER" property="receiverType" />
- <result column="receiver_account" jdbcType="VARCHAR" property="receiverAccount" />
- <result column="receiver_comments" jdbcType="VARCHAR" property="receiverComments" />
- <result column="receiver_params" jdbcType="VARCHAR" property="receiverParams" />
- <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
- <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
- <result column="status" jdbcType="INTEGER" property="status" />
- <result column="plat" jdbcType="INTEGER" property="plat" />
-
- <result column="tt_import_status" jdbcType="VARCHAR" property="ttImportStatus" />
- <result column="tt_import_url" jdbcType="VARCHAR" property="ttImportUrl" />
- <result column="tt_balance_url" jdbcType="VARCHAR" property="ttBalanceUrl" />
- </resultMap>
-
- <sql id="allColumns">
- `id`,`tenant_id`,`parent_tenant_id`,`merchant_id`,
- `receiver_type`,`receiver_account`,`receiver_comments`,`receiver_params`,
- `create_time`,`update_time`,`status`,`plat`,
- `tt_import_status`,`tt_import_url`,`tt_balance_url`
- </sql>
-
- <sql id="dynamicWhereConditions">
- where 1 = 1
-
- <if test=" null != id ">
- and `id` = #{id}
- </if>
-
- <if test=" null != tenantId and '' != tenantId">
- and `tenant_id` = #{tenantId}
- </if>
- <if test=" null != parentTenantId and '' != parentTenantId">
- and `parent_tenant_id` = #{parentTenantId}
- </if>
-
- <if test=" null != merchantId ">
- and `merchant_id` = #{merchantId}
- </if>
-
- <if test=" null != receiverType ">
- and `receiver_type` = #{receiverType}
- </if>
-
- <if test=" null != receiverAccount and '' != receiverAccount ">
- and `receiver_account` like concat('%', #{receiverAccount},'%')
- </if>
-
- <if test=" null != receiverComments ">
- and `receiver_comments` like concat('%', #{receiverComments},'%')
- </if>
-
- <if test=" null != status ">
- and `status` = #{status}
- </if>
-
- <if test=" null != plat ">
- and `plat` = #{plat}
- </if>
-
- <if test=" null != wxImportStatus">
- and `tt_import_status` -> '$.wx' = #{wxImportStatus}
- </if>
- <if test=" null != alipayImportStatus">
- and `tt_import_status` -> '$.alipay' = #{alipayImportStatus}
- </if>
- <if test=" null != hzImportStatus">
- and `tt_import_status` -> '$.hz' = #{hzImportStatus}
- </if>
-
- <if test=" null != ids ">
- and id in
- <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
- #{idItem}
- </foreach>
- </if>
- <if test=" null != sortColumns"> order by ${sortColumns} </if>
- </sql>
-
- <select id="findList" parameterType="com.iformall.domain.po.WxProfitPaymentReceiver" resultMap="BaseResultMap">
- select
- <include refid="allColumns"/>
- from wx_profit_payment_receiver
- <include refid="dynamicWhereConditions"/>
- </select>
-
- <select id="findOne" parameterType="com.iformall.domain.po.WxProfitPaymentReceiver" resultMap="BaseResultMap">
- select
- <include refid="allColumns"/>
- from wx_profit_payment_receiver
- <include refid="dynamicWhereConditions"/>
- limit 0,1
- </select>
-
-
- </mapper>
|