update 优化通过角色ID查询用户逻辑
This commit is contained in:
parent
6886e9fd5b
commit
32ad28c3dc
@ -42,7 +42,7 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* 用户 业务层处理
|
||||
@ -680,10 +680,9 @@ public class SysUserServiceImpl implements ISysUserService, UserService {
|
||||
new LambdaQueryWrapper<SysUserRole>().in(SysUserRole::getRoleId, roleIds));
|
||||
|
||||
// 获取用户ID列表
|
||||
List<Long> userIds = userRoles.stream()
|
||||
.map(SysUserRole::getUserId).distinct().collect(Collectors.toList());
|
||||
Set<Long> userIds = StreamUtils.toSet(userRoles, SysUserRole::getUserId);
|
||||
|
||||
return selectListByIds(userIds);
|
||||
return selectListByIds(new ArrayList<>(userIds));
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user