Commit 09d063469477474cd9f26918b8e580a295cd335b

Authored by 芋道源码
Committed by Gitee
2 parents 0bac2838 1044e1ac

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

Merge pull request !72 from @C/master
yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/permission/PermissionServiceImpl.java
@@ -385,6 +385,8 @@ public class PermissionServiceImpl implements PermissionService { @@ -385,6 +385,8 @@ public class PermissionServiceImpl implements PermissionService {
385 if (Objects.equals(role.getDataScope(), DataScopeEnum.DEPT_AND_CHILD.getScope())) { 385 if (Objects.equals(role.getDataScope(), DataScopeEnum.DEPT_AND_CHILD.getScope())) {
386 List<DeptDO> depts = deptService.getDeptsByParentIdFromCache(loginUser.getDeptId(), true); 386 List<DeptDO> depts = deptService.getDeptsByParentIdFromCache(loginUser.getDeptId(), true);
387 CollUtil.addAll(result.getDeptIds(), CollectionUtils.convertList(depts, DeptDO::getId)); 387 CollUtil.addAll(result.getDeptIds(), CollectionUtils.convertList(depts, DeptDO::getId));
  388 + //添加本身部门id
  389 + CollUtil.addAll(result.getDeptIds(), loginUser.getDeptId());
388 continue; 390 continue;
389 } 391 }
390 // 情况五,SELF 392 // 情况五,SELF