!72 数据权限-部门及以下权限问题

Merge pull request !72 from @C/master
This commit is contained in:
芋道源码 2022-02-07 08:03:00 +00:00 committed by Gitee
commit 09d0634694
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -385,6 +385,8 @@ public class PermissionServiceImpl implements PermissionService {
if (Objects.equals(role.getDataScope(), DataScopeEnum.DEPT_AND_CHILD.getScope())) {
List<DeptDO> depts = deptService.getDeptsByParentIdFromCache(loginUser.getDeptId(), true);
CollUtil.addAll(result.getDeptIds(), CollectionUtils.convertList(depts, DeptDO::getId));
//添加本身部门id
CollUtil.addAll(result.getDeptIds(), loginUser.getDeptId());
continue;
}
// 情况五SELF