文章的评论数统计与日志冲突
Created by: Aanko
我的环境
版本:unknown
数据库:H2 1.4.197 (2018-03-18)
运行模式:production
User Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36 Edg/91.0.864.59
错误日志
无
期望行为
日志与文章的评论数显示正常。
当前行为
当前的日志评论数量似乎和文章的评论数量重合,假设有同一个 id 数值的文章和日志,那么日志的评论数量为对应 id 文章的评论数量。如图:
{
"status": 200,
"message": "OK",
"devMessage": null,
"data": {
"content": [{
"id": 1,
"title": "Hello Halo",
"status": "PUBLISHED",
"slug": "hello-halo",
"editorType": "MARKDOWN",
"updateTime": 1624977398810,
"createTime": 1624977398810,
"editTime": 1624977398810,
"metaKeywords": null,
"metaDescription": null,
"fullPath": "/archives/hello-halo",
"summary": "Hello Halo如果你看到了这一篇文章,那么证明你已经安装成功了,感谢使用 Halo 进行创作,希望能够使用愉快。相关链接官网:https://halo.run文档:https://docs.halo.run社区:https://bbs.halo.run主题仓库:https://halo.run",
"thumbnail": "",
"visits": 1,
"disallowComment": false,
"password": "",
"template": "",
"topPriority": 0,
"likes": 0,
"wordCount": 258,
"commentCount": 2,
"tags": [],
"categories": [{
"id": 1,
"name": "默认分类",
"slug": "default",
"description": "这是你的默认分类,如不需要,删除即可。",
"thumbnail": "",
"parentId": 0,
"password": null,
"createTime": 1624977398110,
"fullPath": "/categories/default"
}],
"metas": {},
"topped": false
}],
"pages": 1,
"total": 1,
"page": 0,
"rpp": 10,
"hasNext": false,
"hasPrevious": false,
"isFirst": true,
"isLast": true,
"isEmpty": false,
"hasContent": true
}
}
{
"status": 200,
"message": "OK",
"devMessage": null,
"data": {
"content": [{
"id": 1,
"sourceContent": "Hello World",
"content": "<p>Hello World</p>\n",
"likes": 0,
"createTime": 1624977431705,
"type": "PUBLIC",
"commentCount": 2
}],
"pages": 1,
"total": 1,
"page": 0,
"rpp": 10,
"hasNext": false,
"hasPrevious": false,
"isFirst": true,
"isLast": true,
"isEmpty": false,
"hasContent": true
}
}