Merge pull request #12 from PaulWangCN/master

fix:修复判断角色是否被引用的错误
pull/33/head
ParkerZhou 3 years ago committed by GitHub
commit 9f1399bc96
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -338,7 +338,7 @@ public class UserRoleRefServiceImpl extends ServiceImpl<UserRoleRefMapper, SysUs
QueryWrapper<SysUserRoleRef> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("role_id", roleId);
return this.count(queryWrapper) == 0;
return this.count(queryWrapper) > 0;
}
@Override
@ -350,7 +350,7 @@ public class UserRoleRefServiceImpl extends ServiceImpl<UserRoleRefMapper, SysUs
QueryWrapper<SysUserRoleRef> queryWrapper = new QueryWrapper<>();
queryWrapper.in("role_id", Convert.toList(roleIds));
return this.count(queryWrapper) == 0;
return this.count(queryWrapper) > 0;
}

Loading…
Cancel
Save