|
@@ -2,38 +2,6 @@
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
<mapper namespace="com.platform.dao.mapper.upms.SysUserMapper">
|
|
|
|
|
|
-<!-- <select id="selectVOByKeyword" resultType="com.platform.dao.vo.SysUserVO"-->
|
|
|
-<!-- parameterType="com.platform.dao.dto.upms.SysUserDTO">-->
|
|
|
-<!-- select u.* from t_sys_user u-->
|
|
|
-<!-- join t_sys_user_role role-->
|
|
|
-<!-- on u.user_id=role.user_id-->
|
|
|
-<!-- where 1=1-->
|
|
|
-<!-- <if test="keyword !=null and keyword !=''">-->
|
|
|
-<!-- and (u.username like CONCAT('%',#{keyword},'%')-->
|
|
|
-<!-- or u.real_name like CONCAT('%',#{keyword},'%'))-->
|
|
|
-<!-- </if>-->
|
|
|
-<!-- <if test="deptId !=null and deptId !=''">-->
|
|
|
-<!-- and exists (select 1 from t_sys_user_dept t where t.user_id = u.user_id and t.dept_id = #{deptId}-->
|
|
|
-<!-- union select 1 from t_sys_dept t where t.dept_id = #{deptId} and t.parent_id = '0')-->
|
|
|
-<!-- </if>-->
|
|
|
-<!-- <if test="phone !=null and phone !=''">-->
|
|
|
-<!-- and u.phone = #{phone}-->
|
|
|
-<!-- </if>-->
|
|
|
-<!-- <if test="username !=null and username !=''">-->
|
|
|
-<!-- and u.username = #{username}-->
|
|
|
-<!-- </if>-->
|
|
|
-<!-- <if test="teamId !=null and teamId !=''">-->
|
|
|
-<!-- and exists (select 1 from t_sys_user_team t where t.user_id = u.user_id and t.team_id = #{teamId})-->
|
|
|
-<!-- </if>-->
|
|
|
-<!-- <if test="identityType !=null">-->
|
|
|
-<!-- and u.identity_type = #{identityType}-->
|
|
|
-<!-- </if>-->
|
|
|
-<!-- <if test="roleId!=null and roleId!=''">-->
|
|
|
-<!-- and role.role_id=#{roleId}-->
|
|
|
-<!-- </if>-->
|
|
|
-<!-- order by u.update_time desc-->
|
|
|
-<!-- </select>-->
|
|
|
-
|
|
|
<select id="selectVOByKeyword" resultType="com.platform.dao.vo.SysUserVO"
|
|
|
parameterType="com.platform.dao.dto.upms.SysUserDTO">
|
|
|
select distinct u.* from t_sys_user u
|
|
@@ -88,24 +56,12 @@
|
|
|
#{item}
|
|
|
</foreach>
|
|
|
</if>
|
|
|
+ <if test="deptId != null and deptId != ''">
|
|
|
+ AND ud.dept_id = #{deptId}
|
|
|
+ </if>
|
|
|
order by u.update_time desc
|
|
|
</select>
|
|
|
|
|
|
-
|
|
|
-<!-- <select id="selectByDept" resultType="com.platform.dao.vo.SysUserVO"-->
|
|
|
-<!-- parameterType="com.platform.dao.dto.upms.SysUserDTO">-->
|
|
|
-<!-- select u.* from t_sys_user u-->
|
|
|
-<!-- left join t_sys_user_dept ud on u.user_id = ud.user_id-->
|
|
|
-<!-- where 1=1-->
|
|
|
-<!-- <if test="deptIds != null and deptIds.size >0">-->
|
|
|
-<!-- AND ud.dept_id in-->
|
|
|
-<!-- <foreach item="item" index="index" collection="deptIds" open="(" close=")" separator=",">-->
|
|
|
-<!-- #{item}-->
|
|
|
-<!-- </foreach>-->
|
|
|
-<!-- </if>-->
|
|
|
-<!-- order by u.update_time desc-->
|
|
|
-<!-- </select>-->
|
|
|
-
|
|
|
<select id="selectDeptRoleUser" resultType="com.platform.dao.vo.SysUserVO"
|
|
|
parameterType="com.platform.dao.dto.upms.SysUserDTO">
|
|
|
select distinct u.* from t_sys_user u, t_sys_user_dept ud, t_sys_user_role ur, t_sys_role r
|