通过roleIds获取userList

This commit is contained in:
sxu 2024-12-03 17:21:06 +08:00
parent 68182251d4
commit 413674820c
1 changed files with 6 additions and 0 deletions

View File

@ -134,6 +134,12 @@
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 test="roleIds != null and roleIds.length > 0">
and ur.role_id in
<foreach collection="roleIds" item="item" index="index" separator="," open="(" close=")">
#{item}
</foreach>
</if>
<include refid="com.bonus.system.mapper.DataScopeMapper.dataScopeFilter"/>
GROUP BY u.user_id
</select>