fix: total comment count for page and singlepage (#2498)

#### What type of PR is this?
/kind improvement
/area core
/milestone 2.0

#### What this PR does / why we need it:
修复文章和自定义页面的总评论数量统计取值错误
#### Which issue(s) this PR fixes:

Fixes #

#### Special notes for your reviewer:
/cc @halo-dev/sig-halo 
#### Does this PR introduce a user-facing change?

```release-note
None
```
pull/2499/head
guqing 2022-09-30 17:44:19 +08:00 committed by GitHub
parent 3b4703533e
commit 708cd12d25
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -85,7 +85,7 @@ public class PostServiceImpl implements PostService {
return Stats.builder()
.visit(counter.getVisit())
.upvote(counter.getUpvote())
.totalComment(counter.getApprovedComment())
.totalComment(counter.getTotalComment())
.approvedComment(counter.getApprovedComment())
.build();
}

View File

@ -218,7 +218,7 @@ public class SinglePageServiceImpl implements SinglePageService {
return Stats.builder()
.visit(counter.getVisit())
.upvote(counter.getUpvote())
.totalComment(counter.getApprovedComment())
.totalComment(counter.getTotalComment())
.approvedComment(counter.getApprovedComment())
.build();
}