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
a98e8975
Commit
a98e8975
authored
Jul 16, 2021
by
刘基明
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
热点数据
parent
ec67d05e
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
3 deletions
+11
-3
ThemeManager.java
...c/main/java/com/tanpu/community/manager/ThemeManager.java
+3
-2
CommentService.java
...main/java/com/tanpu/community/service/CommentService.java
+7
-0
ThemeService.java
...c/main/java/com/tanpu/community/service/ThemeService.java
+1
-1
No files found.
community-service/src/main/java/com/tanpu/community/manager/ThemeManager.java
View file @
a98e8975
...
@@ -297,9 +297,10 @@ public class ThemeManager {
...
@@ -297,9 +297,10 @@ public class ThemeManager {
//点赞,收藏,转发
//点赞,收藏,转发
Integer
likeCount
=
collectionService
.
getCountByTypeAndId
(
themeId
,
CollectionTypeEnum
.
LIKE_THEME
);
Integer
likeCount
=
collectionService
.
getCountByTypeAndId
(
themeId
,
CollectionTypeEnum
.
LIKE_THEME
);
Integer
bookCount
=
collectionService
.
getCountByTypeAndId
(
themeId
,
CollectionTypeEnum
.
COLLECT_THEME
);
// Integer bookCount = collectionService.getCountByTypeAndId(themeId, CollectionTypeEnum.COLLECT_THEME);
Integer
commentCount
=
commentService
.
getCommentCountByThemeId
(
themeId
);
Integer
forwardCount
=
themeService
.
getForwardCountById
(
themeId
);
Integer
forwardCount
=
themeService
.
getForwardCountById
(
themeId
);
themeQo
.
setCommentCount
(
book
Count
);
themeQo
.
setCommentCount
(
comment
Count
);
themeQo
.
setLikeCount
(
likeCount
);
themeQo
.
setLikeCount
(
likeCount
);
themeQo
.
setForwardCount
(
forwardCount
);
themeQo
.
setForwardCount
(
forwardCount
);
}
}
...
...
community-service/src/main/java/com/tanpu/community/service/CommentService.java
View file @
a98e8975
...
@@ -49,6 +49,13 @@ public class CommentService {
...
@@ -49,6 +49,13 @@ public class CommentService {
.
size
();
.
size
();
}
}
//统计主题集合的评论量
public
Integer
getCommentCountByThemeId
(
String
themeId
)
{
return
commentMapper
.
selectList
((
new
LambdaQueryWrapper
<
CommentEntity
>()
.
eq
(
CommentEntity:
:
getThemeId
,
themeId
)))
.
size
();
}
public
Set
<
String
>
getCommentUserCount
(
List
<
String
>
themeIds
)
{
public
Set
<
String
>
getCommentUserCount
(
List
<
String
>
themeIds
)
{
return
commentMapper
.
selectList
((
new
LambdaQueryWrapper
<
CommentEntity
>()
return
commentMapper
.
selectList
((
new
LambdaQueryWrapper
<
CommentEntity
>()
.
in
(
CommentEntity:
:
getThemeId
,
themeIds
)))
.
in
(
CommentEntity:
:
getThemeId
,
themeIds
)))
...
...
community-service/src/main/java/com/tanpu/community/service/ThemeService.java
View file @
a98e8975
...
@@ -172,7 +172,7 @@ public class ThemeService {
...
@@ -172,7 +172,7 @@ public class ThemeService {
public
Integer
getForwardCountById
(
String
themeId
)
{
public
Integer
getForwardCountById
(
String
themeId
)
{
return
themeMapper
.
selectCount
(
new
LambdaQueryWrapper
<
ThemeEntity
>()
return
themeMapper
.
selectCount
(
new
LambdaQueryWrapper
<
ThemeEntity
>()
.
eq
(
ThemeEntity:
:
getThemeId
,
themeId
)
.
eq
(
ThemeEntity:
:
get
Former
ThemeId
,
themeId
)
.
eq
(
ThemeEntity:
:
getDeleteTag
,
DeleteTagEnum
.
NOT_DELETED
));
.
eq
(
ThemeEntity:
:
getDeleteTag
,
DeleteTagEnum
.
NOT_DELETED
));
}
}
...
...
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