|
@@ -61,12 +61,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
left join sys_role r on r.role_id = ur.role_id
|
|
left join sys_role r on r.role_id = ur.role_id
|
|
|
</sql>
|
|
</sql>
|
|
|
|
|
|
|
|
- <select id="selectUserList" parameterType="SysUser" resultMap="SysUserResult">
|
|
|
|
|
|
|
+ <select id="selectUserList" parameterType="com.ruoyi.common.core.domain.entity.SysUser" resultMap="SysUserResult">
|
|
|
select u.user_id, u.dept_id, u.nick_name, u.user_name, u.email, u.avatar, u.phonenumber, u.sex, u.status, u.del_flag,
|
|
select u.user_id, u.dept_id, u.nick_name, u.user_name, u.email, u.avatar, u.phonenumber, u.sex, u.status, u.del_flag,
|
|
|
u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, d.dept_name, d.leader,u.open_id,u.superior_id,
|
|
u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, d.dept_name, d.leader,u.open_id,u.superior_id,
|
|
|
u.project_quantity,u.job_number,u.full_job
|
|
u.project_quantity,u.job_number,u.full_job
|
|
|
from sys_user u
|
|
from sys_user u
|
|
|
left join sys_dept d on u.dept_id = d.dept_id
|
|
left join sys_dept d on u.dept_id = d.dept_id
|
|
|
|
|
+ left join sys_user_post sup on u.user_id = sup.user_id
|
|
|
where u.del_flag = '0'
|
|
where u.del_flag = '0'
|
|
|
<if test="userId != null and userId != 0">
|
|
<if test="userId != null and userId != 0">
|
|
|
AND u.user_id = #{userId}
|
|
AND u.user_id = #{userId}
|
|
@@ -74,6 +75,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="userName != null and userName != ''">
|
|
<if test="userName != null and userName != ''">
|
|
|
AND u.user_name like concat('%', #{userName}, '%')
|
|
AND u.user_name like concat('%', #{userName}, '%')
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+ <if test="jobNumber != null and jobNumber != ''">
|
|
|
|
|
+ AND u.job_number like concat('%', #{jobNumber}, '%')
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="fullJob != null and fullJob != ''">
|
|
|
|
|
+ AND u.full_job = #{fullJob}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="fullJob != null and fullJob != ''">
|
|
|
|
|
+ AND u.full_job = #{fullJob}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="postId != null and postId != ''">
|
|
|
|
|
+ AND sup.post_id = #{postId}
|
|
|
|
|
+ </if>
|
|
|
<if test="status != null and status != ''">
|
|
<if test="status != null and status != ''">
|
|
|
AND u.status = #{status}
|
|
AND u.status = #{status}
|
|
|
</if>
|
|
</if>
|
|
@@ -89,6 +102,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="deptId != null and deptId != 0">
|
|
<if test="deptId != null and deptId != 0">
|
|
|
AND (u.dept_id = #{deptId} OR u.dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE find_in_set(#{deptId}, ancestors) ))
|
|
AND (u.dept_id = #{deptId} OR u.dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE find_in_set(#{deptId}, ancestors) ))
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+ <if test="companyId !=null and companyId != 0">
|
|
|
|
|
+ AND (u.dept_id = #{companyId} OR u.dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE find_in_set(#{companyId}, ancestors) ))
|
|
|
|
|
+ </if>
|
|
|
|
|
+
|
|
|
<!-- 数据范围过滤 -->
|
|
<!-- 数据范围过滤 -->
|
|
|
${params.dataScope}
|
|
${params.dataScope}
|
|
|
</select>
|
|
</select>
|