|
@@ -2102,4 +2102,36 @@
|
|
|
su.id = #{item}
|
|
su.id = #{item}
|
|
|
</foreach>
|
|
</foreach>
|
|
|
</select>
|
|
</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>
|
|
</mapper>
|