feat(comment): 一级评论:子评论总数更新与查询

- 新增批量查询评论计数的数据库接口及SQL实现
- 优化本地缓存中评论ID失效判断逻辑,修正变量命名
- 增加从Redis中获取评论计数数据的功能,并支持缺失时回源数据库
- 实现评论计数数据异步同步至Redis的逻辑,包括子评论总数和点赞数
- 在消费端增加更新Redis中评论子评论总数的逻辑
- 添加评论计数相关的Redis Key和Field常量定义
- 更新HTTP测试用例中的评论内容和回复ID,验证计数同步功能
This commit is contained in:
2025-11-08 21:01:15 +08:00
parent 6f22c2b50d
commit e3f9b6a5b5
7 changed files with 230 additions and 10 deletions

View File

@@ -298,9 +298,9 @@ Authorization: Bearer {{token}}
{
"noteId": 1862481582414102549,
"content": "这是一条测试同步Redis更新热度的评论",
"content": "这是一条测试同步Redis更新计数的评论",
"imageUrl": "https://cdn.pixabay.com/photo/2025/10/05/15/06/autumn-9875155_1280.jpg",
"replyCommentId": 8001
"replyCommentId": 4002
}
### 批量添加评论