mirror of
https://github.com/YunaiV/ruoyi-vue-pro.git
synced 2026-04-19 13:48:37 +00:00
!1448 fix(user):修复用户角色过滤逻辑,确保当用户不包含当前选中角色时返回空结果而非全部用户
Merge pull request !1448 from Manumiter/master-jdk17
This commit is contained in:
@@ -276,7 +276,9 @@ public class AdminUserServiceImpl implements AdminUserService {
|
|||||||
// 如果有角色编号,查询角色对应的用户编号
|
// 如果有角色编号,查询角色对应的用户编号
|
||||||
Set<Long> userIds = reqVO.getRoleId() != null ?
|
Set<Long> userIds = reqVO.getRoleId() != null ?
|
||||||
permissionService.getUserRoleIdListByRoleId(singleton(reqVO.getRoleId())) : null;
|
permissionService.getUserRoleIdListByRoleId(singleton(reqVO.getRoleId())) : null;
|
||||||
|
if (userIds != null && userIds.isEmpty()) {
|
||||||
|
return PageResult.empty();
|
||||||
|
}
|
||||||
// 分页查询
|
// 分页查询
|
||||||
return userMapper.selectPage(reqVO, getDeptCondition(reqVO.getDeptId()), userIds);
|
return userMapper.selectPage(reqVO, getDeptCondition(reqVO.getDeptId()), userIds);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user