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
102b435b
Commit
102b435b
authored
Jul 15, 2021
by
刘基明
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
话题列表fix
parent
b9de5ab4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
4 deletions
+20
-4
ThemeQo.java
...c/main/java/com/tanpu/community/api/beans/qo/ThemeQo.java
+1
-1
QueryRecordThemeReq.java
...community/api/beans/req/homepage/QueryRecordThemeReq.java
+1
-1
ThemeManager.java
...c/main/java/com/tanpu/community/manager/ThemeManager.java
+18
-2
No files found.
community-api/src/main/java/com/tanpu/community/api/beans/qo/ThemeQo.java
View file @
102b435b
...
@@ -24,7 +24,7 @@ public class ThemeQo {
...
@@ -24,7 +24,7 @@ public class ThemeQo {
@ApiModelProperty
(
value
=
"标题"
)
@ApiModelProperty
(
value
=
"标题"
)
private
String
title
;
private
String
title
;
@ApiModelProperty
(
value
=
"类型 1:讨论无标题 2:长文有标题 3:转发"
)
@ApiModelProperty
(
value
=
"类型 1:讨论无标题 2:长文有标题 3:转发
4:评论
"
)
private
Integer
themeType
;
private
Integer
themeType
;
@ApiModelProperty
(
value
=
"内容"
)
@ApiModelProperty
(
value
=
"内容"
)
...
...
community-api/src/main/java/com/tanpu/community/api/beans/req/homepage/QueryRecordThemeReq.java
View file @
102b435b
...
@@ -13,7 +13,7 @@ public class QueryRecordThemeReq {
...
@@ -13,7 +13,7 @@ public class QueryRecordThemeReq {
@ApiModelProperty
(
"用户Id"
)
@ApiModelProperty
(
"用户Id"
)
private
String
userId
;
private
String
userId
;
@ApiModelProperty
(
value
=
"操作类型 1:发布 2:
点赞 3
:收藏"
)
@ApiModelProperty
(
value
=
"操作类型 1:发布 2:
回复 3:点赞 4
:收藏"
)
private
Integer
recordType
;
private
Integer
recordType
;
@ApiModelProperty
(
value
=
"当前浏览的最后一个themeId,可以为空"
)
@ApiModelProperty
(
value
=
"当前浏览的最后一个themeId,可以为空"
)
...
...
community-service/src/main/java/com/tanpu/community/manager/ThemeManager.java
View file @
102b435b
...
@@ -113,11 +113,26 @@ public class ThemeManager {
...
@@ -113,11 +113,26 @@ public class ThemeManager {
case
1
:
//发布
case
1
:
//发布
themeEntities
=
themeService
.
queryThemeIdsByUserId
(
req
.
getUserId
());
themeEntities
=
themeService
.
queryThemeIdsByUserId
(
req
.
getUserId
());
break
;
break
;
case
2
:
//点赞
case
2
:
//回复
List
<
CommentEntity
>
commentEntities
=
commentService
.
queryThemesByUserId
(
req
.
getUserId
());
Set
<
String
>
replyThemeIds
=
commentEntities
.
stream
().
map
(
CommentEntity:
:
getThemeId
).
collect
(
Collectors
.
toSet
());
themeEntities
=
themeService
.
queryByThemeIds
(
new
ArrayList
<>(
replyThemeIds
));
List
<
ThemeQo
>
themeQos
=
convertEntityToQo
(
themeEntities
,
userId
);
for
(
ThemeQo
themeQo
:
themeQos
)
{
FormerThemeQo
f
=
FormerThemeQo
.
builder
().
formerThemeId
(
themeQo
.
getThemeId
())
.
forwardContent
(
themeQo
.
getContent
())
.
userImg
(
themeQo
.
getUserImg
())
.
nickName
(
themeQo
.
getNickName
())
.
build
();
themeQo
.
setFormerTheme
(
f
);
}
break
;
case
3
:
//点赞
Set
<
String
>
likeThemeIds
=
collectionService
.
getListByUser
(
userId
,
CollectionTypeEnum
.
LIKE_THEME
);
Set
<
String
>
likeThemeIds
=
collectionService
.
getListByUser
(
userId
,
CollectionTypeEnum
.
LIKE_THEME
);
themeEntities
=
themeService
.
queryByThemeIds
(
new
ArrayList
<>(
likeThemeIds
));
themeEntities
=
themeService
.
queryByThemeIds
(
new
ArrayList
<>(
likeThemeIds
));
break
;
break
;
case
3
:
//收藏
case
4
:
//收藏
Set
<
String
>
collectThemeIds
=
collectionService
.
getListByUser
(
userId
,
CollectionTypeEnum
.
COLLECT_THEME
);
Set
<
String
>
collectThemeIds
=
collectionService
.
getListByUser
(
userId
,
CollectionTypeEnum
.
COLLECT_THEME
);
themeEntities
=
themeService
.
queryByThemeIds
(
new
ArrayList
<>(
collectThemeIds
));
themeEntities
=
themeService
.
queryByThemeIds
(
new
ArrayList
<>(
collectThemeIds
));
break
;
break
;
...
@@ -231,6 +246,7 @@ public class ThemeManager {
...
@@ -231,6 +246,7 @@ public class ThemeManager {
for
(
ThemeQo
themeQO
:
themeQos
)
{
for
(
ThemeQo
themeQO
:
themeQos
)
{
buildThemeQoExtraInfo
(
userId
,
themeQO
);
buildThemeQoExtraInfo
(
userId
,
themeQO
);
}
}
return
themeQos
;
return
themeQos
;
}
}
...
...
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