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
Mar 01, 2022
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
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 {
...
@@ -72,6 +72,8 @@ public class TopicReportService {
List
<
TopicEntity
>
topics
=
topicService
.
queryTopicNeedReport
();
List
<
TopicEntity
>
topics
=
topicService
.
queryTopicNeedReport
();
for
(
TopicEntity
topic
:
topics
)
{
for
(
TopicEntity
topic
:
topics
)
{
log
.
info
(
"reportTopicWeekday for topic: "
+
topic
.
getTopicId
());
// 当前总成员
// 当前总成员
Integer
totalFollowNum
=
topicService
.
countTotalFollow
(
topic
.
getTopicId
());
Integer
totalFollowNum
=
topicService
.
countTotalFollow
(
topic
.
getTopicId
());
...
@@ -80,10 +82,10 @@ public class TopicReportService {
...
@@ -80,10 +82,10 @@ public class TopicReportService {
// 讨论量 包括主题数量和评论数量 不算长文
// 讨论量 包括主题数量和评论数量 不算长文
List
<
String
>
totalThemeIds
=
themeService
.
queryThemeIdsByTopic
(
topic
.
getTopicId
());
List
<
String
>
totalThemeIds
=
themeService
.
queryThemeIdsByTopic
(
topic
.
getTopicId
());
if
(
totalThemeIds
.
isEmpty
())
continue
;
Integer
totalCommentNum
=
commentService
.
getCommentCountByThemeIds
(
totalThemeIds
);
Integer
totalCommentNum
=
commentService
.
getCommentCountByThemeIds
(
totalThemeIds
);
Integer
totalDiscussNum
=
totalCommentNum
+
totalThemeIds
.
size
();
Integer
totalDiscussNum
=
totalCommentNum
+
totalThemeIds
.
size
();
Date
endDate
=
DateUtils
.
getDayStartTime
(
new
Date
());
Date
endDate
=
DateUtils
.
getDayStartTime
(
new
Date
());
Date
startDate
=
DateUtils
.
getAfterDay
(
endDate
,
-
1
);
Date
startDate
=
DateUtils
.
getAfterDay
(
endDate
,
-
1
);
// 昨日新增成员
// 昨日新增成员
...
@@ -114,6 +116,8 @@ public class TopicReportService {
...
@@ -114,6 +116,8 @@ public class TopicReportService {
public
void
reportTopicSaturday
()
{
public
void
reportTopicSaturday
()
{
List
<
TopicEntity
>
topics
=
topicService
.
queryTopicNeedReport
();
List
<
TopicEntity
>
topics
=
topicService
.
queryTopicNeedReport
();
for
(
TopicEntity
topic
:
topics
)
{
for
(
TopicEntity
topic
:
topics
)
{
log
.
info
(
"reportTopicSaturday for topic: "
+
topic
.
getTopicId
());
// 当前总成员
// 当前总成员
Integer
totalFollowNum
=
topicService
.
countTotalFollow
(
topic
.
getTopicId
());
Integer
totalFollowNum
=
topicService
.
countTotalFollow
(
topic
.
getTopicId
());
...
@@ -134,6 +138,7 @@ public class TopicReportService {
...
@@ -134,6 +138,7 @@ public class TopicReportService {
// 昨日新增讨论
// 昨日新增讨论
List
<
String
>
newThemeIds
=
themeService
.
queryThemeIdsByTopic
(
topic
.
getTopicId
(),
startDate
,
endDate
);
List
<
String
>
newThemeIds
=
themeService
.
queryThemeIdsByTopic
(
topic
.
getTopicId
(),
startDate
,
endDate
);
if
(
newThemeIds
.
isEmpty
())
continue
;
Integer
newCommentNum
=
commentService
.
getCommentCountByThemeIds
(
totalThemeIds
,
startDate
,
endDate
);
Integer
newCommentNum
=
commentService
.
getCommentCountByThemeIds
(
totalThemeIds
,
startDate
,
endDate
);
Integer
newDiscussNum
=
newThemeIds
.
size
()
+
newCommentNum
;
Integer
newDiscussNum
=
newThemeIds
.
size
()
+
newCommentNum
;
...
...
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