角色修改接口调整
This commit is contained in:
@@ -120,7 +120,7 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> imp
|
|||||||
throw new ApiNotPrintException("角色不存在");
|
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) {
|
if (roleCount > 0) {
|
||||||
throw new ApiNotPrintException("此角色名称已存在");
|
throw new ApiNotPrintException("此角色名称已存在");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user