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
65020671
Commit
65020671
authored
Jul 09, 2021
by
刘基明
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
主题接口修改
parent
17afcce7
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
3 deletions
+8
-3
ThemeManager.java
...c/main/java/com/tanpu/community/manager/ThemeManager.java
+5
-0
TopicManager.java
...c/main/java/com/tanpu/community/manager/TopicManager.java
+3
-3
No files found.
community-service/src/main/java/com/tanpu/community/manager/ThemeManager.java
View file @
65020671
...
...
@@ -230,6 +230,11 @@ public class ThemeManager {
//附件列表
String
themeId
=
themeQO
.
getThemeId
();
List
<
ThemeContentQo
>
content
=
themeQO
.
getContent
();
if
(
content
!=
null
&&
content
.
size
()>
2
){
themeQO
.
setContent
(
content
.
subList
(
0
,
2
));
}
content
=
themeQO
.
getContent
();
for
(
ThemeContentQo
themeContentQo
:
content
)
{
transferAttachment
(
themeContentQo
,
userId
);
}
...
...
community-service/src/main/java/com/tanpu/community/manager/TopicManager.java
View file @
65020671
...
...
@@ -77,11 +77,9 @@ public class TopicManager {
TopicDetailQo
topicDetailQo
=
new
TopicDetailQo
();
BeanUtils
.
copyProperties
(
topicEntity
,
topicDetailQo
);
List
<
String
>
themeIds
=
themeService
.
queryThemeIdsByTopic
(
topicId
);
Integer
likeCountByThemeIds
=
collectionService
.
getCountByTypeAndIds
(
themeIds
,
CollectionTypeEnum
.
LIKE_THEME
);
Integer
bookCountByThemeIds
=
collectionService
.
getCountByTypeAndIds
(
themeIds
,
CollectionTypeEnum
.
BOOK_THEME
);
//TODO 浏览量
topicDetailQo
.
setViewCount
(
0
);
topicDetailQo
.
setViewCount
(
100
0
);
//讨论数=发布主题贴数+回复总数
Integer
commentCount
=
commentService
.
getCommentCountByThemeIds
(
themeIds
);
topicDetailQo
.
setDisscussCount
(
themeIds
.
size
()+
commentCount
);
...
...
@@ -93,6 +91,8 @@ public class TopicManager {
List
<
TopicEntity
>
topicEntities
=
topicService
.
queryAll
();
List
<
TopicHotQo
>
topicHotQos
=
ConvertUtil
.
topicEntityToHotQos
(
topicEntities
);
//TODO 添加类型:热 新 顶
topicHotQos
.
get
(
0
).
setType
(
1
);
topicHotQos
.
get
(
2
).
setType
(
2
);
return
topicHotQos
;
}
...
...
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