|
|
@@ -60,9 +60,6 @@
|
|
|
<if test="sysUser.roleId != null && sysUser.roleId != ''">
|
|
|
and sur.role_id = #{sysUser.roleId}
|
|
|
</if>
|
|
|
- <if test="sysUser.deptId != null && sysUser.deptId != ''">
|
|
|
- and su.dept_id = #{sysUser.deptId}
|
|
|
- </if>
|
|
|
|
|
|
<if test="sysUser.status != null">
|
|
|
and su.status = #{sysUser.status}
|
|
|
@@ -106,7 +103,6 @@
|
|
|
select
|
|
|
<include refid="Sys_User_Column_List"/>
|
|
|
<include refid="Sys_User_Where_Clause"></include>
|
|
|
-
|
|
|
<if test="sysUser.deptName != null && sysUser.deptName != ''">
|
|
|
<include refid="Sys_User_Where_Clause_deptName"></include>
|
|
|
</if>
|
|
|
@@ -2102,4 +2098,36 @@
|
|
|
su.id = #{item}
|
|
|
</foreach>
|
|
|
</select>
|
|
|
+
|
|
|
+ <select id="findAllUsers" resultType="com.ydtech.modules.admin.model.vo.SysUserBaseVO">
|
|
|
+ SELECT
|
|
|
+ t1.id AS userId,
|
|
|
+ t1.NAME AS NAME,
|
|
|
+ t1.mobile AS mobile,
|
|
|
+ t1.`status` AS `status`,
|
|
|
+ t2.id AS deptId,
|
|
|
+ t2.`name` AS deptName,
|
|
|
+ sd2.id AS pDeptId,
|
|
|
+ sd2.`name` AS pDeptName
|
|
|
+ FROM
|
|
|
+ sys_user t1
|
|
|
+ LEFT JOIN sys_dept t2 ON t1.dept_id = t2.id
|
|
|
+ LEFT JOIN sys_dept sd2 ON sd2.id = t2.parent_id
|
|
|
+ WHERE
|
|
|
+ t1.`status` = 1
|
|
|
+ <if test='user !=null '>
|
|
|
+ <if test='user.name !=null and user.name!="" '>
|
|
|
+ and t1.name like CONCAT('%', #{user.name}, '%')
|
|
|
+ </if>
|
|
|
+ <if test='user.userId !=null and user.userId!="" '>
|
|
|
+ and t1.id = #{user.userId}
|
|
|
+ </if>
|
|
|
+ <if test='user.mobile !=null and user.mobile!="" '>
|
|
|
+ and t1.mobile = #{user.mobile}
|
|
|
+ </if>
|
|
|
+ <if test='user.deptId !=null and user.deptId!="" '>
|
|
|
+ and t2.id like CONCAT('', #{user.deptId}, '%')
|
|
|
+ </if>
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
</mapper>
|