修改角色重名文案提示
This commit is contained in:
parent
abf3bd7c0a
commit
32b324a0a0
@ -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()))
|
Optional<SaasPermissionGroup> repeatName = groups.stream().filter(g -> !Objects.equals(g.getId(), saasPermissionGroup.getId()) && StringUtils.equalsIgnoreCase(saasPermissionGroup.getName(), g.getName()))
|
||||||
.findFirst();
|
.findFirst();
|
||||||
if (repeatName.isPresent()) {
|
if (repeatName.isPresent()) {
|
||||||
throw new ServiceException("同角色,分组名称不能重复");
|
throw new ServiceException("同角色,例外名称不能重复");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return saasPermissionGroup;
|
return saasPermissionGroup;
|
||||||
|
|||||||
@ -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()))
|
.filter(e -> Objects.nonNull(e) && !Objects.equals(e.getId(), saveOrUpdateRole.getId()) && StringUtils.equalsIgnoreCase(e.getName(), saasRole.getName()))
|
||||||
.findFirst();
|
.findFirst();
|
||||||
if (repeatNameRole.isPresent()) {
|
if (repeatNameRole.isPresent()) {
|
||||||
throw new ServiceException("同分组内不角色名称不能重复");
|
throw new ServiceException("同分组内角色名称不能重复");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user