<?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="doumeemes.dao.ext.SystemUserExternalExtMapper"> 
 | 
  
 | 
  <!-- 管理页面查询 --> 
 | 
  <resultMap id="SystemUserExternalExtListVO" type="doumeemes.dao.ext.vo.SystemUserExternalExtListVO" autoMapping="true"> 
 | 
    <id column="ID" jdbcType="INTEGER" property="id"/> 
 | 
    <association property="emodel" javaType="doumeemes.dao.system.model.SystemExternal"> 
 | 
      <id column="EMODEL_ID" jdbcType="INTEGER" property="id"/> 
 | 
      <result column="EMODEL_DELETED" jdbcType="TINYINT" property="deleted"/> 
 | 
      <result column="EMODEL_CREATE_USER" jdbcType="INTEGER" property="createUser"/> 
 | 
      <result column="EMODEL_CREATE_TIME" jdbcType="TIMESTAMP" property="createTime"/> 
 | 
      <result column="EMODEL_UPDATE_USER" jdbcType="INTEGER" property="updateUser"/> 
 | 
      <result column="EMODEL_UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime"/> 
 | 
      <result column="EMODEL_NAME" jdbcType="VARCHAR" property="name"/> 
 | 
      <result column="EMODEL_INFO" jdbcType="VARCHAR" property="info"/> 
 | 
      <result column="EMODEL_ACCOUNT_ID" jdbcType="VARCHAR" property="accountId"/> 
 | 
      <result column="EMODEL_ACCOUNT_KEY" jdbcType="VARCHAR" property="accountKey"/> 
 | 
      <result column="EMODEL_DETAILS" jdbcType="VARCHAR" property="details"/> 
 | 
      <result column="EMODEL_TYPE" jdbcType="INTEGER" property="type"/> 
 | 
    </association> 
 | 
    <association property="umodel" javaType="doumeemes.dao.system.model.SystemUser"> 
 | 
      <id column="UMODEL_ID" jdbcType="INTEGER" property="id"/> 
 | 
      <result column="UMODEL_DELETED" jdbcType="TINYINT" property="deleted"/> 
 | 
      <result column="UMODEL_CREATE_USER" jdbcType="INTEGER" property="createUser"/> 
 | 
      <result column="UMODEL_CREATE_TIME" jdbcType="TIMESTAMP" property="createTime"/> 
 | 
      <result column="UMODEL_UPDATE_USER" jdbcType="INTEGER" property="updateUser"/> 
 | 
      <result column="UMODEL_UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime"/> 
 | 
      <result column="UMODEL_FIXED" jdbcType="TINYINT" property="fixed"/> 
 | 
      <result column="UMODEL_PASSWORD" jdbcType="VARCHAR" property="password"/> 
 | 
      <result column="UMODEL_SALT" jdbcType="VARCHAR" property="salt"/> 
 | 
      <result column="UMODEL_AVATAR" jdbcType="VARCHAR" property="avatar"/> 
 | 
      <result column="UMODEL_MOBILE" jdbcType="VARCHAR" property="mobile"/> 
 | 
      <result column="UMODEL_EMAIL" jdbcType="VARCHAR" property="email"/> 
 | 
      <result column="UMODEL_SEX" jdbcType="VARCHAR" property="sex"/> 
 | 
      <result column="UMODEL_BIRTHDAY" jdbcType="DATE" property="birthday"/> 
 | 
      <result column="UMODEL_EMP_NO" jdbcType="VARCHAR" property="empNo"/> 
 | 
      <result column="UMODEL_REALNAME" jdbcType="VARCHAR" property="realname"/> 
 | 
      <result column="UMODEL_USERNAME" jdbcType="VARCHAR" property="username"/> 
 | 
      <result column="UMODEL_SYSTEMID" jdbcType="VARCHAR" property="systemid"/> 
 | 
      <result column="UMODEL_INVALID_TIME" jdbcType="TIMESTAMP" property="invalidTime"/> 
 | 
      <result column="UMODEL_TYPE" jdbcType="INTEGER" property="type"/> 
 | 
    </association> 
 | 
  </resultMap> 
 | 
  <select id="selectList" parameterType="doumeemes.dao.ext.dto.QuerySystemUserExternalExtDTO" resultMap="SystemUserExternalExtListVO"> 
 | 
    SELECT 
 | 
      `a`.`ID`, 
 | 
      `a`.`DELETED`, 
 | 
      `a`.`CREATE_USER`, 
 | 
      `a`.`CREATE_TIME`, 
 | 
      `a`.`UPDATE_USER`, 
 | 
      `a`.`UPDATE_TIME`, 
 | 
      `a`.`USER_ID`, 
 | 
      `a`.`SYSTEM_ID`, 
 | 
      `a`.`ACCOUNT_ID`, 
 | 
      `a`.`DETAILS`, 
 | 
      `emodel`.`ID` AS EMODEL_ID, 
 | 
      `emodel`.`DELETED` AS EMODEL_DELETED, 
 | 
      `emodel`.`CREATE_USER` AS EMODEL_CREATE_USER, 
 | 
      `emodel`.`CREATE_TIME` AS EMODEL_CREATE_TIME, 
 | 
      `emodel`.`UPDATE_USER` AS EMODEL_UPDATE_USER, 
 | 
      `emodel`.`UPDATE_TIME` AS EMODEL_UPDATE_TIME, 
 | 
      `emodel`.`NAME` AS EMODEL_NAME, 
 | 
      `emodel`.`INFO` AS EMODEL_INFO, 
 | 
      `emodel`.`ACCOUNT_ID` AS EMODEL_ACCOUNT_ID, 
 | 
      `emodel`.`ACCOUNT_KEY` AS EMODEL_ACCOUNT_KEY, 
 | 
      `emodel`.`DETAILS` AS EMODEL_DETAILS, 
 | 
      `emodel`.`TYPE` AS EMODEL_TYPE, 
 | 
      `umodel`.`ID` AS UMODEL_ID, 
 | 
      `umodel`.`DELETED` AS UMODEL_DELETED, 
 | 
      `umodel`.`CREATE_USER` AS UMODEL_CREATE_USER, 
 | 
      `umodel`.`CREATE_TIME` AS UMODEL_CREATE_TIME, 
 | 
      `umodel`.`UPDATE_USER` AS UMODEL_UPDATE_USER, 
 | 
      `umodel`.`UPDATE_TIME` AS UMODEL_UPDATE_TIME, 
 | 
      `umodel`.`FIXED` AS UMODEL_FIXED, 
 | 
      `umodel`.`PASSWORD` AS UMODEL_PASSWORD, 
 | 
      `umodel`.`SALT` AS UMODEL_SALT, 
 | 
      `umodel`.`AVATAR` AS UMODEL_AVATAR, 
 | 
      `umodel`.`MOBILE` AS UMODEL_MOBILE, 
 | 
      `umodel`.`EMAIL` AS UMODEL_EMAIL, 
 | 
      `umodel`.`SEX` AS UMODEL_SEX, 
 | 
      `umodel`.`BIRTHDAY` AS UMODEL_BIRTHDAY, 
 | 
      `umodel`.`EMP_NO` AS UMODEL_EMP_NO, 
 | 
      `umodel`.`REALNAME` AS UMODEL_REALNAME, 
 | 
      `umodel`.`USERNAME` AS UMODEL_USERNAME, 
 | 
      `umodel`.`SYSTEMID` AS UMODEL_SYSTEMID, 
 | 
      `umodel`.`INVALID_TIME` AS UMODEL_INVALID_TIME, 
 | 
      `umodel`.`TYPE` AS UMODEL_TYPE 
 | 
    FROM `system_user_external` `a` 
 | 
    LEFT JOIN `system_external` `emodel` ON a.SYSTEM_ID=emodel.ID 
 | 
    LEFT JOIN `system_user` `umodel` ON a.USER_ID=umodel.ID 
 | 
    <where> 
 | 
      <if test="id != null"> 
 | 
        AND `a`.`ID` = #{id} 
 | 
      </if> 
 | 
      <if test="deleted != null"> 
 | 
        AND `a`.`DELETED` = #{deleted} 
 | 
      </if> 
 | 
      <if test="createUser != null"> 
 | 
        AND `a`.`CREATE_USER` = #{createUser} 
 | 
      </if> 
 | 
      <if test="createTime != null"> 
 | 
        AND `a`.`CREATE_TIME` = #{createTime} 
 | 
      </if> 
 | 
      <if test="updateUser != null"> 
 | 
        AND `a`.`UPDATE_USER` = #{updateUser} 
 | 
      </if> 
 | 
      <if test="updateTime != null"> 
 | 
        AND `a`.`UPDATE_TIME` = #{updateTime} 
 | 
      </if> 
 | 
      <if test="userId != null"> 
 | 
        AND `a`.`USER_ID` = #{userId} 
 | 
      </if> 
 | 
      <if test="systemId != null"> 
 | 
        AND `a`.`SYSTEM_ID` = #{systemId} 
 | 
      </if> 
 | 
      <if test="accountId != null and accountId != ''"> 
 | 
        AND `a`.`ACCOUNT_ID` = #{accountId} 
 | 
      </if> 
 | 
      <if test="details != null and details != ''"> 
 | 
        AND `a`.`DETAILS` = #{details} 
 | 
      </if> 
 | 
      <if test="emodelId != null"> 
 | 
        AND `emodel`.`ID` = #{emodelId} 
 | 
      </if> 
 | 
      <if test="emodelDeleted != null"> 
 | 
        AND `emodel`.`DELETED` = #{emodelDeleted} 
 | 
      </if> 
 | 
      <if test="emodelCreateUser != null"> 
 | 
        AND `emodel`.`CREATE_USER` = #{emodelCreateUser} 
 | 
      </if> 
 | 
      <if test="emodelCreateTime != null"> 
 | 
        AND `emodel`.`CREATE_TIME` = #{emodelCreateTime} 
 | 
      </if> 
 | 
      <if test="emodelUpdateUser != null"> 
 | 
        AND `emodel`.`UPDATE_USER` = #{emodelUpdateUser} 
 | 
      </if> 
 | 
      <if test="emodelUpdateTime != null"> 
 | 
        AND `emodel`.`UPDATE_TIME` = #{emodelUpdateTime} 
 | 
      </if> 
 | 
      <if test="emodelName != null and emodelName != ''"> 
 | 
        AND `emodel`.`NAME` = #{emodelName} 
 | 
      </if> 
 | 
      <if test="emodelInfo != null and emodelInfo != ''"> 
 | 
        AND `emodel`.`INFO` = #{emodelInfo} 
 | 
      </if> 
 | 
      <if test="emodelAccountId != null and emodelAccountId != ''"> 
 | 
        AND `emodel`.`ACCOUNT_ID` = #{emodelAccountId} 
 | 
      </if> 
 | 
      <if test="emodelAccountKey != null and emodelAccountKey != ''"> 
 | 
        AND `emodel`.`ACCOUNT_KEY` = #{emodelAccountKey} 
 | 
      </if> 
 | 
      <if test="emodelDetails != null and emodelDetails != ''"> 
 | 
        AND `emodel`.`DETAILS` = #{emodelDetails} 
 | 
      </if> 
 | 
      <if test="emodelType != null"> 
 | 
        AND `emodel`.`TYPE` = #{emodelType} 
 | 
      </if> 
 | 
      <if test="umodelId != null"> 
 | 
        AND `umodel`.`ID` = #{umodelId} 
 | 
      </if> 
 | 
      <if test="umodelDeleted != null"> 
 | 
        AND `umodel`.`DELETED` = #{umodelDeleted} 
 | 
      </if> 
 | 
      <if test="umodelCreateUser != null"> 
 | 
        AND `umodel`.`CREATE_USER` = #{umodelCreateUser} 
 | 
      </if> 
 | 
      <if test="umodelCreateTime != null"> 
 | 
        AND `umodel`.`CREATE_TIME` = #{umodelCreateTime} 
 | 
      </if> 
 | 
      <if test="umodelUpdateUser != null"> 
 | 
        AND `umodel`.`UPDATE_USER` = #{umodelUpdateUser} 
 | 
      </if> 
 | 
      <if test="umodelUpdateTime != null"> 
 | 
        AND `umodel`.`UPDATE_TIME` = #{umodelUpdateTime} 
 | 
      </if> 
 | 
      <if test="umodelFixed != null"> 
 | 
        AND `umodel`.`FIXED` = #{umodelFixed} 
 | 
      </if> 
 | 
      <if test="umodelPassword != null and umodelPassword != ''"> 
 | 
        AND `umodel`.`PASSWORD` = #{umodelPassword} 
 | 
      </if> 
 | 
      <if test="umodelSalt != null and umodelSalt != ''"> 
 | 
        AND `umodel`.`SALT` = #{umodelSalt} 
 | 
      </if> 
 | 
      <if test="umodelAvatar != null and umodelAvatar != ''"> 
 | 
        AND `umodel`.`AVATAR` = #{umodelAvatar} 
 | 
      </if> 
 | 
      <if test="umodelMobile != null and umodelMobile != ''"> 
 | 
        AND `umodel`.`MOBILE` = #{umodelMobile} 
 | 
      </if> 
 | 
      <if test="umodelEmail != null and umodelEmail != ''"> 
 | 
        AND `umodel`.`EMAIL` = #{umodelEmail} 
 | 
      </if> 
 | 
      <if test="umodelSex != null and umodelSex != ''"> 
 | 
        AND `umodel`.`SEX` = #{umodelSex} 
 | 
      </if> 
 | 
      <if test="umodelBirthday != null"> 
 | 
        AND `umodel`.`BIRTHDAY` = #{umodelBirthday} 
 | 
      </if> 
 | 
      <if test="umodelEmpNo != null and umodelEmpNo != ''"> 
 | 
        AND `umodel`.`EMP_NO` = #{umodelEmpNo} 
 | 
      </if> 
 | 
      <if test="umodelRealname != null and umodelRealname != ''"> 
 | 
        AND `umodel`.`REALNAME` = #{umodelRealname} 
 | 
      </if> 
 | 
      <if test="umodelUsername != null and umodelUsername != ''"> 
 | 
        AND `umodel`.`USERNAME` = #{umodelUsername} 
 | 
      </if> 
 | 
      <if test="umodelSystemid != null and umodelSystemid != ''"> 
 | 
        AND `umodel`.`SYSTEMID` = #{umodelSystemid} 
 | 
      </if> 
 | 
      <if test="umodelInvalidTime != null"> 
 | 
        AND `umodel`.`INVALID_TIME` = #{umodelInvalidTime} 
 | 
      </if> 
 | 
      <if test="umodelType != null"> 
 | 
        AND `umodel`.`TYPE` = #{umodelType} 
 | 
      </if> 
 | 
    </where> 
 | 
  </select> 
 | 
</mapper> 
 |