|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147 |
- <?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.WxProfitSharingReceiverMapper">
- <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxProfitSharingReceiver">
- <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="create_time" jdbcType="TIMESTAMP" property="createTime" />
- <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
- <result column="sharing_type" jdbcType="INTEGER" property="sharingType" />
- <result column="bank_no" jdbcType="VARCHAR" property="bankNo" />
- <result column="true_name" jdbcType="VARCHAR" property="trueName" />
- <result column="bank_code" jdbcType="VARCHAR" property="bankCode" />
- <result column="status" jdbcType="INTEGER" property="status" />
- <result column="parameter" jdbcType="VARCHAR" property="parameter" />
-
- <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`,`create_time`,`update_time`,`sharing_type`,`bank_no`,`true_name`,`bank_code`,`status`,`parameter`,`is_use`
- ,`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 `receiver_account` like concat('%', #{receiverAccount},'%')
-
- </if>
-
- <if test=" null != receiverComments ">
- and `receiver_comments` like concat('%', #{receiverComments},'%')
-
- </if>
-
- <if test=" null != createTime ">
- and `create_time` = #{createTime}
-
- </if>
-
- <if test=" null != updateTime ">
- and `update_time` = #{updateTime}
-
- </if>
-
- <if test=" null != sharingType ">
- and `sharing_type` = #{sharingType}
-
- </if>
-
- <if test=" null != bankNo ">
- and `bank_no` like concat('%', #{bankNo},'%')
-
- </if>
-
- <if test=" null != trueName ">
- and `true_name` like concat('%', #{trueName},'%')
-
- </if>
-
- <if test=" null != bankCode ">
- and `bank_code` like concat('%', #{bankCode},'%')
-
- </if>
-
- <if test=" null != status ">
- and `status` = #{status}
-
- </if>
-
- <if test=" null !=isUse ">
- and `is_use` = #{isUse}
-
- </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.WxProfitSharingReceiver" resultMap="BaseResultMap">
- select
- <include refid="allColumns"/>
- from wx_profit_sharing_receiver
- <include refid="dynamicWhereConditions"/>
- </select>
-
- <select id="findOne" parameterType="com.iformall.domain.po.WxProfitSharingReceiver" resultMap="BaseResultMap">
- select
- <include refid="allColumns"/>
- from wx_profit_sharing_receiver
- <include refid="dynamicWhereConditions"/>
- limit 0,1
- </select>
-
-
- <select id="findMerchantIdList" parameterType="com.iformall.domain.po.WxProfitSharingReceiver" resultType="Long">
- select `merchant_id`
- from wx_profit_sharing_receiver
- <include refid="dynamicWhereConditions"/>
- </select>
-
-
- </mapper>
|