Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
beyond-clouds
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
4
Issues
4
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
段启岩
beyond-clouds
Commits
589084e0
Commit
589084e0
authored
Feb 12, 2020
by
Author name
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2.12 我关注的用户的动态列表
parent
7534649c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
src/main/java/cn/meteor/beyondclouds/modules/post/service/impl/PostServiceImpl.java
+7
-2
No files found.
src/main/java/cn/meteor/beyondclouds/modules/post/service/impl/PostServiceImpl.java
View file @
589084e0
...
...
@@ -248,14 +248,19 @@ public class PostServiceImpl extends ServiceImpl<PostMapper, Post> implements IP
//查询出我所关注的用户
QueryWrapper
<
UserFollow
>
userFollowQueryWrapper
=
new
QueryWrapper
<>();
userFollowQueryWrapper
.
eq
(
"follower_id"
,
userId
);
List
<
String
>
followdeIds
=
userFollowService
.
list
(
userFollowQueryWrapper
).
stream
()
userFollowQueryWrapper
.
eq
(
"follow_status"
,
0
);
List
<
String
>
followedIds
=
userFollowService
.
list
(
userFollowQueryWrapper
).
stream
()
.
map
(
UserFollow:
:
getFollowedId
)
.
collect
(
Collectors
.
toList
());
//获取我关注的用户的动态
if
(!
CollectionUtils
.
isEmpty
(
followedIds
))
{
QueryWrapper
<
Post
>
postQueryWrapper
=
new
QueryWrapper
<>();
postQueryWrapper
.
in
(
"user_id"
,
followde
Ids
);
postQueryWrapper
.
in
(
"user_id"
,
followed
Ids
);
postQueryWrapper
.
orderByDesc
(
"create_time"
);
return
page
(
postPage
,
postQueryWrapper
);
}
else
{
return
postPage
;
}
}
...
...
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