|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293 |
- <?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.WxOpinionMapper">
- <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxOpinion">
- <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="user_id" jdbcType="BIGINT" property="userId"/>
- <result column="liaison_man" jdbcType="VARCHAR" property="liaisonMan"/>
- <result column="liaison_sex" jdbcType="TINYINT" property="liaisonSex"/>
- <result column="liaison_phone" jdbcType="VARCHAR" property="liaisonPhone"/>
- <result column="liaison_email" jdbcType="VARCHAR" property="liaisonEmail"/>
- <result column="title" jdbcType="VARCHAR" property="title"/>
- <result column="pictures" jdbcType="VARCHAR" property="pictures"/>
- <result column="explains" jdbcType="VARCHAR" property="explains"/>
- <result column="remark" jdbcType="VARCHAR" property="remark"/>
- <result column="handle_status" jdbcType="TINYINT" property="handleStatus"/>
- <result column="handle_id" jdbcType="BIGINT" property="handleId"/>
- <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`, `user_id`, `liaison_man`, `liaison_sex`, `liaison_phone`, `liaison_email`,
- `pictures`,`title`, `explains`, `remark`, `handle_status`, `handle_id`, `create_date`,`update_date`
- </sql>
-
- <sql id="dynamicWhereConditions">
- where `del_status` = 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 != userId ">
- and `user_id` = #{userId}
- </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 != liaisonEmail ">
- and `liaison_email` like concat('%', #{liaisonEmail},'%')
- </if>
-
- <if test=" null != liaisonSex ">
- and `liaison_sex` = #{liaisonSex}
- </if>
-
- <if test=" null != title ">
- and `title` like concat('%', #{title},'%')
- </if>
-
- <if test=" null != handleStatus ">
- and `handle_status` = #{handleStatus}
- </if>
-
- <if test=" null != startDate ">
- and `create_date` >= #{startDate}
- </if>
- <if test=" null != endDate ">
- 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.WxOpinion" resultMap="BaseResultMap">
- select
- <include refid="allColumns"/>
- from wx_opinion
- <include refid="dynamicWhereConditions"/>
- </select>
-
- </mapper>
|