|
|
@@ -174,6 +174,55 @@
|
|
|
</if>
|
|
|
</select>
|
|
|
|
|
|
+ <select id="findAllUserList" resultType="com.ydtech.modules.admin.model.vo.SysUserBaseVO">
|
|
|
+ SELECT
|
|
|
+ su.id as userId,
|
|
|
+ su.name,
|
|
|
+ info.sex,
|
|
|
+ su.mobile,
|
|
|
+ su.status,
|
|
|
+ sd.id as deptId,
|
|
|
+ sd.name as deptName,
|
|
|
+ t4.id as roleId,
|
|
|
+ t4.name as roleName,
|
|
|
+ sd.management_source,
|
|
|
+ psd.id as pDeptId,
|
|
|
+ psd.name as pDeptName
|
|
|
+ FROM
|
|
|
+ sys_user su
|
|
|
+ LEFT JOIN sys_user_info info ON info.id = su.id
|
|
|
+ LEFT JOIN sys_dept sd ON su.dept_id = sd.id
|
|
|
+ left join sys_dept psd on psd.id = sd.parent_id
|
|
|
+ LEFT JOIN sys_user_role t3 ON su.id = t3.user_id
|
|
|
+ LEFT JOIN sys_role t4 ON t3.role_id = t4.id
|
|
|
+ AND sd.del_flag = '0'
|
|
|
+ WHERE
|
|
|
+ 1=1
|
|
|
+ <if test='user !=null '>
|
|
|
+ <if test='user.status !=null and user.status!="" '>
|
|
|
+ and su.status = #{user.status}
|
|
|
+ </if>
|
|
|
+ <if test='user.name !=null and user.name!="" '>
|
|
|
+ and su.name like concat('%',#{user.name},'%')
|
|
|
+ </if>
|
|
|
+ <if test='user.userId !=null and user.userId!="" '>
|
|
|
+ and su.id = #{user.userId}
|
|
|
+ </if>
|
|
|
+ <if test='user.mobile !=null and user.mobile!="" '>
|
|
|
+ and su.mobile = #{user.mobile}
|
|
|
+ </if>
|
|
|
+ <if test='user.deptId !=null and user.deptId!="" '>
|
|
|
+ and su.dept_id like concat('%',#{user.deptId},'%')
|
|
|
+ </if>
|
|
|
+ <if test='user.leaderName !=null and user.leaderName!="" '>
|
|
|
+ and su.leader_name like concat('%',#{user.leaderName},'%')
|
|
|
+ </if>
|
|
|
+ <if test='user.roleId !=null and user.roleId!="" '>
|
|
|
+ and t3.role_id in (${user.roleId})
|
|
|
+ </if>
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+
|
|
|
|
|
|
<select id="findBackUserList" resultType="com.ydtech.modules.admin.model.vo.SysUserBaseVO">
|
|
|
SELECT
|