feat(count): 实现评论发布后异步更新笔记评论数功能
- 新增 CountPublishCommentMqDTO 用于传输评论计数消息 - 在评论服务中添加异步发送评论计数消息逻辑 - 新建 CountNoteCommentConsumer 消费评论计数消息并批量更新笔记评论数 - 扩展 t_comment 表结构,新增 child_comment_total 字段 - 更新 MQ 常量配置,添加评论计数相关 Topic 定义 - 调整 LIKE/UNLIKE 和 COLLECT/UNCOLLECT 消费者中的注解使用(防止循环依赖) - 修改 gateApi.http 中的测试用例内容以适配新功能
This commit is contained in:
@@ -280,4 +280,9 @@ CREATE TABLE `t_comment_like`
|
||||
DEFAULT CHARSET = utf8mb4
|
||||
COLLATE = utf8mb4_unicode_ci COMMENT ='评论点赞表';
|
||||
|
||||
-- 表:t_comment表冗余字段
|
||||
alter table t_comment
|
||||
add column `child_comment_total` bigint(20) unsigned DEFAULT '0' COMMENT '二级评论总数(只有一级评论才需要统计)';
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user