mirror of
https://gitee.com/yudaocode/yudao-boot-mini.git
synced 2025-12-26 07:06:22 +08:00
fix(user):修复用户角色过滤逻辑,确保当用户不包含当前选中角色时返回空结果而非全部用户
This commit is contained in:
parent
2c41d5622c
commit
31f6d03d67
@ -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);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user