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
0963b0ff
Commit
0963b0ff
authored
3 years ago
by
张辰
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'v2.3.1' into 'dev'
fix bug See merge request
!101
parents
bb03cc5b
023b0b0f
dev
No related merge requests found
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
TopicReportService.java
...om/tanpu/community/service/quartz/TopicReportService.java
+6
-1
No files found.
community-service/src/main/java/com/tanpu/community/service/quartz/TopicReportService.java
View file @
0963b0ff
...
...
@@ -72,6 +72,8 @@ public class TopicReportService {
List
<
TopicEntity
>
topics
=
topicService
.
queryTopicNeedReport
();
for
(
TopicEntity
topic
:
topics
)
{
log
.
info
(
"reportTopicWeekday for topic: "
+
topic
.
getTopicId
());
// 当前总成员
Integer
totalFollowNum
=
topicService
.
countTotalFollow
(
topic
.
getTopicId
());
...
...
@@ -80,10 +82,10 @@ public class TopicReportService {
// 讨论量 包括主题数量和评论数量 不算长文
List
<
String
>
totalThemeIds
=
themeService
.
queryThemeIdsByTopic
(
topic
.
getTopicId
());
if
(
totalThemeIds
.
isEmpty
())
continue
;
Integer
totalCommentNum
=
commentService
.
getCommentCountByThemeIds
(
totalThemeIds
);
Integer
totalDiscussNum
=
totalCommentNum
+
totalThemeIds
.
size
();
Date
endDate
=
DateUtils
.
getDayStartTime
(
new
Date
());
Date
startDate
=
DateUtils
.
getAfterDay
(
endDate
,
-
1
);
// 昨日新增成员
...
...
@@ -114,6 +116,8 @@ public class TopicReportService {
public
void
reportTopicSaturday
()
{
List
<
TopicEntity
>
topics
=
topicService
.
queryTopicNeedReport
();
for
(
TopicEntity
topic
:
topics
)
{
log
.
info
(
"reportTopicSaturday for topic: "
+
topic
.
getTopicId
());
// 当前总成员
Integer
totalFollowNum
=
topicService
.
countTotalFollow
(
topic
.
getTopicId
());
...
...
@@ -134,6 +138,7 @@ public class TopicReportService {
// 昨日新增讨论
List
<
String
>
newThemeIds
=
themeService
.
queryThemeIdsByTopic
(
topic
.
getTopicId
(),
startDate
,
endDate
);
if
(
newThemeIds
.
isEmpty
())
continue
;
Integer
newCommentNum
=
commentService
.
getCommentCountByThemeIds
(
totalThemeIds
,
startDate
,
endDate
);
Integer
newDiscussNum
=
newThemeIds
.
size
()
+
newCommentNum
;
...
...
This diff is collapsed.
Click to expand it.
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