Commit 023b0b0f authored by 张辰's avatar 张辰

fix bug

parent 700f13aa
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment