Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in
Toggle navigation
T
tanpu-community
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
探普后端
tanpu-community
Commits
1b7d5b56
Commit
1b7d5b56
authored
Oct 15, 2021
by
王亚雷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
关注列表
parent
5cf99e31
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
HomePageManager.java
...ain/java/com/tanpu/community/manager/HomePageManager.java
+5
-4
No files found.
community-service/src/main/java/com/tanpu/community/manager/HomePageManager.java
View file @
1b7d5b56
...
...
@@ -264,20 +264,21 @@ public class HomePageManager {
List
<
UserInfoResp
>
userInfoNews
=
feignClientForFatools
.
queryUserListNew
(
userIdsPage
.
getContent
());
List
<
FollowQo
>
followQos
=
userInfoNews
.
stream
().
map
(
ConvertUtil:
:
userInfoNew2FollowQo
).
collect
(
Collectors
.
toList
());
if
(
StringUtils
.
isNotEmpty
(
userId
))
{
judgeFollowed
(
followQos
,
userId
);
followQos
=
judgeFollowed
(
followQos
,
userId
);
}
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
));
followQos
.
stream
().
peek
(
o
->
{
return
followQos
.
stream
().
map
(
o
->
{
if
(
idolSet
.
contains
(
o
.
getUserId
()))
{
o
.
setFollowed
(
true
);
}
});
return
o
;
}).
collect
(
Collectors
.
toList
());
}
public
void
addFollowRel
(
FollowRelReq
req
,
String
followerId
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment