<?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="cn.flightfeather.supervision.domain.ds1.mapper.UserinfoMapper">
|
<resultMap id="BaseResultMap" type="cn.flightfeather.supervision.domain.ds1.entity.Userinfo">
|
<!--
|
WARNING - @mbg.generated
|
-->
|
<id column="UI_GUID" jdbcType="VARCHAR" property="guid" />
|
<result column="UI_AcountName" jdbcType="VARCHAR" property="acountname" />
|
<result column="UI_RealName" jdbcType="VARCHAR" property="realname" />
|
<result column="UI_Password" jdbcType="VARCHAR" property="password" />
|
<result column="UI_UserTypeID" jdbcType="TINYINT" property="usertypeid" />
|
<result column="UI_UserType" jdbcType="VARCHAR" property="usertype" />
|
<result column="D_GUID" jdbcType="VARCHAR" property="dGuid" />
|
<result column="UI_DepartmentName" jdbcType="VARCHAR" property="departmentname" />
|
<result column="UI_IsEnable" jdbcType="BIT" property="isenable" />
|
<result column="UI_WorkNo" jdbcType="VARCHAR" property="workno" />
|
<result column="UI_Telephone" jdbcType="VARCHAR" property="telephone" />
|
<result column="UI_WechatID" jdbcType="VARCHAR" property="wechatid" />
|
<result column="UI_Extension1" jdbcType="VARCHAR" property="extension1" />
|
<result column="UI_Extension2" jdbcType="VARCHAR" property="extension2" />
|
<result column="UI_Extension3" jdbcType="VARCHAR" property="extension3" />
|
<result column="UI_Remark" jdbcType="VARCHAR" property="remark" />
|
</resultMap>
|
<sql id="Base_Column_List">
|
<!--
|
WARNING - @mbg.generated
|
-->
|
UI_GUID, UI_AcountName, UI_RealName, UI_Password, UI_UserTypeID,
|
UI_UserType, D_GUID, UI_DepartmentName, UI_IsEnable,
|
UI_WorkNo, UI_Telephone, UI_WechatID, UI_Extension1,
|
UI_Extension2, UI_Extension3, UI_Remark
|
</sql>
|
|
<select id="searchUser" resultMap="BaseResultMap">
|
SELECT
|
a.*
|
FROM
|
sm_t_userinfo AS a
|
LEFT JOIN sm_t_scense AS b ON a.D_GUID = b.S_GUID
|
WHERE
|
(a.UI_WorkNo IS NULL OR a.UI_WorkNo != 'test')
|
<if test="areaVo.provincecode != null">
|
AND b.S_ProvinceCode = #{areaVo.provincecode}
|
</if>
|
<if test="areaVo.provincename != null">
|
AND b.S_ProvinceName = #{areaVo.provincename}
|
</if>
|
<if test="areaVo.citycode != null">
|
AND b.S_CityCode = #{areaVo.citycode}
|
</if>
|
<if test="areaVo.cityname != null">
|
AND b.S_CityName = #{areaVo.cityname}
|
</if>
|
<if test="areaVo.districtcode != null">
|
AND b.S_DistrictCode = #{areaVo.districtcode}
|
</if>
|
<if test="areaVo.districtname != null">
|
AND b.S_DistrictName = #{areaVo.districtname}
|
</if>
|
<if test="areaVo.towncode != null">
|
AND b.S_TownCode = #{areaVo.towncode}
|
</if>
|
<if test="areaVo.townname != null">
|
AND b.S_TownName = #{areaVo.townname}
|
</if>
|
<if test="areaVo.scensetypeid != null">
|
AND b.S_TypeID = #{areaVo.scensetypeid}
|
</if>
|
<if test="areaVo.online == true">
|
AND b.S_Extension1 = '1'
|
</if>
|
<if test="areaVo.online == false">
|
AND b.S_Extension1 = '0'
|
</if>
|
<if test="userTypeId != null">
|
AND a.UI_UserTypeID = #{userTypeId}
|
</if>
|
<if test="keyword != null and keyword != ''">
|
AND (
|
a.UI_AcountName LIKE CONCAT('%', #{keyword}, '%')
|
OR
|
a.UI_RealName LIKE CONCAT('%', #{keyword}, '%')
|
)
|
</if>
|
</select>
|
</mapper>
|