|
- <?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.simple.mapper.WxCUserBasicInfoMapper">
- <resultMap id="BaseResultMap" type="com.simple.domain.po.WxCUserBasicInfo">
- <id column="id" jdbcType="BIGINT" property="id" />
- <result column="phone" jdbcType="VARCHAR" property="phone" />
- <result column="birthdate" jdbcType="TIMESTAMP" property="birthdate" />
- <result column="education" jdbcType="VARCHAR" property="education" />
- <result column="sex" jdbcType="INTEGER" property="sex" />
- <result column="email" jdbcType="VARCHAR" property="email" />
- <result column="address" jdbcType="VARCHAR" property="address" />
- <result column="poins" jdbcType="INTEGER" property="poins" />
- <result column="tag_id" jdbcType="BIGINT" property="tagId" />
- <result column="c_user_id" jdbcType="BIGINT" property="cUserId" />
- <result column="create_date" jdbcType="TIMESTAMP" property="createDate" />
- <result column="update_date" jdbcType="TIMESTAMP" property="updateDate" />
- <result column="tenant_id" jdbcType="VARCHAR" property="tenantId" />
- <result column="merchant_id" jdbcType="BIGINT" property="merchantId" />
- </resultMap>
-
- <sql id="allColumns">
- `id`,`phone`,`birthdate`,`education`,`sex`,`email`,`address`,`poins`,`tag_id`,`c_user_id`,`create_date`,`update_date`,`tenant_id`,`merchant_id`
- </sql>
-
- <sql id="dynamicWhereConditions">
- where 1 = 1
-
- <if test=" null != id ">
- and `id` = #{id}
-
- </if>
-
- <if test=" null != phone ">
- and `phone` like concat('%', #{phone},'%')
-
- </if>
-
- <if test=" null != birthdate ">
- and `birthdate` = #{birthdate}
-
- </if>
-
- <if test=" null != education ">
- and `education` like concat('%', #{education},'%')
-
- </if>
-
- <if test=" null != sex ">
- and `sex` = #{sex}
-
- </if>
-
- <if test=" null != email ">
- and `email` like concat('%', #{email},'%')
-
- </if>
-
- <if test=" null != address ">
- and `address` like concat('%', #{address},'%')
-
- </if>
-
- <if test=" null != poins ">
- and `poins` = #{poins}
-
- </if>
-
- <if test=" null != tagId ">
- and `tag_id` = #{tagId}
-
- </if>
-
- <if test=" null != cUserId ">
- and `c_user_id` = #{cUserId}
-
- </if>
-
- <if test=" null != createDate ">
- and `create_date` = #{createDate}
-
- </if>
-
- <if test=" null != updateDate ">
- and `update_date` = #{updateDate}
-
- </if>
-
- <if test=" null != tenantId ">
- and `tenant_id` like concat('%', #{tenantId},'%')
-
- </if>
-
- <if test=" null != merchantId ">
- and `merchant_id` = #{merchantId}
-
- </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.simple.domain.po.WxCUserBasicInfo" resultMap="BaseResultMap">
- select <include refid="allColumns" /> from wx_c_user_basic_info
- <include refid="dynamicWhereConditions" />
- </select>
-
-
-
-
-
-
- </mapper>
|