feat(2227-通讯录): modify保存或更新自定义权限接口

This commit is contained in:
李昆鹏 2024-04-08 16:26:32 +08:00
parent 2436b8ab65
commit 308623e6d4

View File

@ -437,10 +437,12 @@ public class RoleUserService implements SaasRoleUserService {
Long autoOwnRoleId = null;
if (CollectionUtils.isNotEmpty(existsRoleUser)) {
List<Long> autoOwnRoles = existsRoleUser.stream().filter(e -> role.getId().equals(e.getRoleId())).mapToLong(SaasRoleUserRelation::getRoleId).boxed().collect(Collectors.toList());
if (CollectionUtils.isNotEmpty(autoOwnRoles) && autoOwnRoles.size() > 1) {
log.warn("personId:{} ouId:{} workspaceId:{} has {} auto_own roles", req.getPersonId(), req.getOuId(), req.getWorkspaceId(), autoOwnRoles.size());
if (CollectionUtils.isNotEmpty(autoOwnRoles)) {
autoOwnRoleId = autoOwnRoles.get(0);
if (autoOwnRoles.size() > 1) {
log.warn("personId:{} ouId:{} workspaceId:{} has {} auto_own roles", req.getPersonId(), req.getOuId(), req.getWorkspaceId(), autoOwnRoles.size());
}
}
autoOwnRoleId = autoOwnRoles.get(0);
}
if (Objects.isNull(autoOwnRoleId)) {