|
|
|
|
@ -1,11 +1,11 @@ |
|
|
|
|
package org.springblade.system.service.impl; |
|
|
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
|
|
|
import jakarta.annotation.Resource; |
|
|
|
|
import lombok.Data; |
|
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
|
import org.apache.commons.collections4.CollectionUtils; |
|
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
|
import org.springblade.core.tool.api.R; |
|
|
|
|
import org.springblade.core.tool.utils.Func; |
|
|
|
|
import org.springblade.system.pojo.entity.Role; |
|
|
|
|
import org.springblade.system.pojo.entity.User; |
|
|
|
|
@ -40,12 +40,11 @@ public class UserExtServiceImpl implements IUserExtService { |
|
|
|
|
if (StringUtils.isBlank(roleAlias)) { |
|
|
|
|
return null; |
|
|
|
|
} |
|
|
|
|
QueryWrapper<Role> qw = new QueryWrapper<Role>().eq("ROLE_ALIAS", roleAlias); |
|
|
|
|
Role role = roleService.getOne(qw); |
|
|
|
|
if (role == null) { |
|
|
|
|
List<Role> list = roleService.list(Wrappers.lambdaQuery(Role.class).eq(Role::getRoleAlias, roleAlias)); |
|
|
|
|
if (CollectionUtils.isEmpty(list)) { |
|
|
|
|
return null; |
|
|
|
|
} |
|
|
|
|
return userSearchService.listByRole(List.of(role.getId())); |
|
|
|
|
return userSearchService.listByRole(list.stream().map(Role::getId).toList()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|