|
- <?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.TtUpSettleinMapper">
- <resultMap id="BaseResultMap" type="com.iformall.domain.po.tt.TtUpSettlein">
- <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="cuser_id" jdbcType="BIGINT" property="cuserId"/>
- <result column="invitation_code" jdbcType="VARCHAR" property="invitationCode"/>
- <result column="liaison_man" jdbcType="VARCHAR" property="liaisonMan"/>
- <result column="liaison_phone" jdbcType="VARCHAR" property="liaisonPhone"/>
- <result column="tt_user_name" jdbcType="VARCHAR" property="ttUserName"/>
- <result column="tt_count_fans" jdbcType="VARCHAR" property="ttCountFans"/>
- <result column="bussiness_types" jdbcType="VARCHAR" property="bussinessTypes"/>
- <result column="explains" jdbcType="VARCHAR" property="explains"/>
- <result column="remark" jdbcType="VARCHAR" property="remark"/>
- <result column="handle_status" jdbcType="INTEGER" property="handleStatus"/>
- <result column="create_date" jdbcType="TIMESTAMP" property="createDate"/>
- <result column="update_date" jdbcType="TIMESTAMP" property="updateDate"/>
-
- </resultMap>
-
- <sql id="allColumns">
- `id`,`tenant_id`,`parent_tenant_id`,`cuser_id`,`invitation_code`,`liaison_man`,`liaison_phone`,
- `tt_user_name`,`tt_count_fans`,`bussiness_types`,`explains`,
- `remark`,`handle_status`,`create_date`,`update_date`
- </sql>
-
- <sql id="dynamicWhereConditions">
- where `is_del` = 0
-
- <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 != cuserId ">
- and `cuser_id` = #{cuserId}
- </if>
-
- <if test=" null != invitationCode and '' != invitationCode">
- and `invitation_code` = #{invitationCode}
- </if>
-
- <if test=" null != liaisonMan ">
- and `liaison_man` like concat('%', #{liaisonMan},'%')
- </if>
-
- <if test=" null != liaisonPhone ">
- and `liaison_phone` like concat('%', #{liaisonPhone},'%')
- </if>
-
- <if test=" null != ttUserName ">
- and `tt_user_name` like concat('%', #{ttUserName},'%')
- </if>
-
- <if test=" null != handleStatus ">
- and `handle_status` = #{handleStatus}
- </if>
-
- <if test="startdate != null">
- and `create_date` >= #{startdate}
- </if>
- <if test="enddate != null">
- and `create_date` <= #{enddate}
- </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.tt.TtUpSettlein" resultMap="BaseResultMap">
- select
- <include refid="allColumns"/>
- from tt_up_settlein
- <include refid="dynamicWhereConditions"/>
- </select>
-
- </mapper>
|