fix bug:selectedOu.size

This commit is contained in:
陈维伟 2023-09-15 17:28:23 +08:00
parent 1b72a1c10c
commit f699a6049f

View File

@ -421,7 +421,7 @@ public class PermissionGroupImpl implements PermissionGroupService {
.collect(Collectors.groupingBy(SaveOrUpdatePermissionGroupVO.PermissionGroupScopeVO::getType));
List<SaveOrUpdatePermissionGroupVO.PermissionGroupScopeVO> includeScopes = Optional.ofNullable(selectedOuMap.get(PermissionScope.INCLUDE.getCode())).orElse(new ArrayList<>());
List<SaveOrUpdatePermissionGroupVO.PermissionGroupScopeVO> excludeScopes = Optional.ofNullable(selectedOuMap.get(PermissionScope.EXCLUDE.getCode())).orElse(new ArrayList<>());
if (includeScopes.size() + excludeScopes.size() != selectedWorkspace.size()) {
if (includeScopes.size() + excludeScopes.size() != selectedOu.size()) {
throw new BizException(BaseCode.BAD_REQUEST, "选择类型设置错误");
}
if (CollectionUtils.containsAny(includeScopes, excludeScopes)) {