feat(comment): 实现评论异步消费与内容存储

- 新增评论内容批量存储接口与实现
- 实现MQ消息消费端处理评论发布逻辑
- 支持一级与二级评论的层级关系构建
- 添加评论内容与元数据分离存储机制
- 集成分布式ID生成服务用于评论ID生成
- 完善评论相关DTO、DO、BO模型类
- 添加Cassandra数据库操作支持
- 实现Feign接口调用与事务控制
This commit is contained in:
2025-11-05 19:19:19 +08:00
parent c37b16ff42
commit a37e76c87c
22 changed files with 575 additions and 4 deletions

View File

@@ -291,13 +291,41 @@ Content-Type: application/json
"pageNo": 1
}
###
### 发布评论
POST http://localhost:8000/comment/comment/publish
Content-Type: application/json
Authorization: Bearer {{token}}
{
"noteId": 1862481582414102549,
"content": "这是第三个评论,测试一下异步消息重试",
"imageUrl": "https://cdn.pixabay.com/photo/2025/10/05/15/06/autumn-9875155_1280.jpg"
"content": "这是一条回复测试评论",
"imageUrl": "https://cdn.pixabay.com/photo/2025/10/05/15/06/autumn-9875155_1280.jpg",
"replyCommentId": 2001
}
### 批量添加评论
POST http://localhost:8084/kv/comment/content/batchAdd
Content-Type: application/json
{
"comments": [
{
"noteId": 1862481582414102548,
"yearMonth": "2024-12",
"contentId": "db8339cd-beba-40a5-9182-c51c2588ae04",
"content": "这是一条评论内容1"
},
{
"noteId": 1862481582414102539,
"yearMonth": "2024-12",
"contentId": "db8339cd-beba-40a5-9182-c51c2588ae05",
"content": "这是一条评论内容2"
},
{
"noteId": 1862481582414102540,
"yearMonth": "2024-12",
"contentId": "db8339cd-beba-40a5-9182-c51c2588ae06",
"content": "这是一条评论内容3"
}
]
}