角色修改接口调整
This commit is contained in:
parent
763faa6f84
commit
483c67dab0
|
|
@ -120,7 +120,7 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> imp
|
|||
throw new ApiNotPrintException("角色不存在");
|
||||
}
|
||||
|
||||
long roleCount = queryChain().eq(SysRole::getName, roleEditDTO.getName()).count();
|
||||
long roleCount = queryChain().eq(SysRole::getName, roleEditDTO.getName()).ne(SysRole::getId, roleEditDTO.getId()).count();
|
||||
if (roleCount > 0) {
|
||||
throw new ApiNotPrintException("此角色名称已存在");
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue