Commit c581c3b6 by guojuxing

角色删除接口修改:验证是否正在被使用,如果是,不能被删除

parent b637e85d
......@@ -109,7 +109,7 @@ public class RoleApiServiceImpl implements RoleApiService{
}
//判断是否正在被用户使用
List<TabSysUserRole> userRoleList = userRoleService.listUserRoleByRoleId(id);
if (userRoleList.size() < 1) {
if (userRoleList.size() > 0) {
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "无法删除,正在被使用");
}
roleService.deleteById(id);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment