fix:fixed error when disable user who don't have any roles

pull/518/head
wangmingcan 2020-10-27 15:51:56 +08:00
parent 50ba70493c
commit ee15a72468
1 changed files with 3 additions and 0 deletions

View File

@ -154,6 +154,9 @@ public class RoleServiceImpl implements RoleService {
@Override
public Integer findByRoles(Set<Role> roles) {
if (roles.size() == 0) {
return Integer.MAX_VALUE;
}
Set<RoleDto> roleDtos = new HashSet<>();
for (Role role : roles) {
roleDtos.add(findById(role.getId()));