mirror of
https://gitee.com/zhijiantianya/ruoyi-vue-pro.git
synced 2026-03-22 05:07:17 +08: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 ?
|
||||
permissionService.getUserRoleIdListByRoleId(singleton(reqVO.getRoleId())) : null;
|
||||
|
||||
if (userIds != null && userIds.isEmpty()) {
|
||||
return PageResult.empty();
|
||||
}
|
||||
// 分页查询
|
||||
return userMapper.selectPage(reqVO, getDeptCondition(reqVO.getDeptId()), userIds);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user