mirror of https://gitee.com/stylefeng/roses
【8.3.3】【dataScope】修复数据范围判空问题
parent
d9fa5a8ab3
commit
445a246de1
|
@ -159,6 +159,9 @@ public class UserRoleDataScopeImpl implements UserRoleDataScopeApi {
|
|||
// 如果是32-指定机构层级及以下
|
||||
else if (DataScopeTypeEnum.DEFINE_ORG_LEVEL_WITH_CHILD.getCode().equals(sysRoleDataScope.getDataScopeType())) {
|
||||
Long parentOrgLevelOrgId = organizationServiceApi.getParentOrgLevel(loginUser.getCurrentOrgId(), sysRoleDataScope.getOrgLevelCode());
|
||||
if (parentOrgLevelOrgId == null) {
|
||||
continue;
|
||||
}
|
||||
Set<Long> subOrgIdList = this.getPointOrgAndSub(parentOrgLevelOrgId);
|
||||
userOrgIdList.addAll(subOrgIdList);
|
||||
}
|
||||
|
@ -192,6 +195,9 @@ public class UserRoleDataScopeImpl implements UserRoleDataScopeApi {
|
|||
* @since 2025/1/25 22:24
|
||||
*/
|
||||
public Set<Long> getPointOrgAndSub(Long orgId) {
|
||||
if (orgId == null) {
|
||||
return CollectionUtil.set(false);
|
||||
}
|
||||
Set<Long> subOrgIdList = this.dbOperatorApi.findSubListByParentId("sys_hr_organization", "org_pids", "org_id", orgId);
|
||||
subOrgIdList.add(orgId);
|
||||
return subOrgIdList;
|
||||
|
|
Loading…
Reference in New Issue