Commit e0bcafd3 authored by 王亚雷's avatar 王亚雷

Merge remote-tracking branch 'origin/bugfix-20211015' into dev

parents d061e1d2 1b7d5b56
...@@ -264,20 +264,21 @@ public class HomePageManager { ...@@ -264,20 +264,21 @@ public class HomePageManager {
List<UserInfoResp> userInfoNews = feignClientForFatools.queryUserListNew(userIdsPage.getContent()); List<UserInfoResp> userInfoNews = feignClientForFatools.queryUserListNew(userIdsPage.getContent());
List<FollowQo> followQos = userInfoNews.stream().map(ConvertUtil::userInfoNew2FollowQo).collect(Collectors.toList()); List<FollowQo> followQos = userInfoNews.stream().map(ConvertUtil::userInfoNew2FollowQo).collect(Collectors.toList());
if (StringUtils.isNotEmpty(userId)) { if (StringUtils.isNotEmpty(userId)) {
judgeFollowed(followQos, userId); followQos = judgeFollowed(followQos, userId);
} }
return PageUtils.page(userIdsPage, followQos); return PageUtils.page(userIdsPage, followQos);
} }
//判断返回列表中的用户是否被当前用户关注 //判断返回列表中的用户是否被当前用户关注
public void judgeFollowed(List<FollowQo> followQos, @NotEmpty String followerId) { public List<FollowQo> judgeFollowed(List<FollowQo> followQos, @NotEmpty String followerId) {
Set<String> idolSet = new HashSet<>(followRelService.queryIdolsByFansId(followerId)); Set<String> idolSet = new HashSet<>(followRelService.queryIdolsByFansId(followerId));
followQos.stream().peek(o -> { return followQos.stream().map(o -> {
if (idolSet.contains(o.getUserId())) { if (idolSet.contains(o.getUserId())) {
o.setFollowed(true); o.setFollowed(true);
} }
}); return o;
}).collect(Collectors.toList());
} }
public void addFollowRel(FollowRelReq req, String followerId) { public void addFollowRel(FollowRelReq req, String followerId) {
......
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