feat:(REQ-2186) 角色分组权限编码改成租户下唯一

This commit is contained in:
lilong 2024-05-20 11:38:01 +08:00
parent 6273381010
commit bd7c22d33c

View File

@ -208,6 +208,8 @@ public class SaasRoleGroupServiceImpl extends ServiceImpl<SaasRoleGroupMapper, S
Integer count = saasRoleGroupDao.lambdaQuery()
.eq(SaasRoleGroup::getCode, req.getCode())
.eq(SaasRoleGroup::getIsDelete, TableIsDeleteEnum.NORMAL.value)
.eq(Objects.nonNull(req.getWorkspaceId()), SaasRoleGroup::getWorkspaceId,req.getWorkspaceId())
.eq(Objects.nonNull(req.getOuId()), SaasRoleGroup::getOuId,req.getOuId())
.count();
if (count > 0) {
throw new ServiceException("角色分组编码已经存在");