修改角色重名文案提示

This commit is contained in:
陈维伟 2023-09-19 15:57:55 +08:00
parent abf3bd7c0a
commit 32b324a0a0
2 changed files with 2 additions and 2 deletions

View File

@ -332,7 +332,7 @@ public class PermissionGroupImpl implements PermissionGroupService {
Optional<SaasPermissionGroup> repeatName = groups.stream().filter(g -> !Objects.equals(g.getId(), saasPermissionGroup.getId()) && StringUtils.equalsIgnoreCase(saasPermissionGroup.getName(), g.getName()))
.findFirst();
if (repeatName.isPresent()) {
throw new ServiceException("同角色,分组名称不能重复");
throw new ServiceException("同角色,例外名称不能重复");
}
}
return saasPermissionGroup;

View File

@ -307,7 +307,7 @@ public class RoleServiceImpl implements RoleService {
.filter(e -> Objects.nonNull(e) && !Objects.equals(e.getId(), saveOrUpdateRole.getId()) && StringUtils.equalsIgnoreCase(e.getName(), saasRole.getName()))
.findFirst();
if (repeatNameRole.isPresent()) {
throw new ServiceException("同分组内角色名称不能重复");
throw new ServiceException("同分组内角色名称不能重复");
}
});
}