refactor(data-align):优化数据对齐任务与MQ消费逻辑

fix(data-align,note):点赞同一用户发布的两篇不同笔记,无法保存变更记录。点赞笔记的SQL查询错误修复。

- 移除了事务模板,简化数据库操作流程
- 分离笔记ID与用户ID的布隆过滤器处理逻辑- 新增针对笔记作者的点赞/收藏数变更记录
- 重构Redis键命名规范,区分笔记与用户维度
- 优化MQ消息处理流程,增强异常捕获机制
- 更新HTTP客户端测试用例与环境配置
-修复NoteServiceImpl中点赞查询的用户ID条件缺失
- 调整分片计算方式,提升数据分布均匀性
This commit is contained in:
2025-10-24 20:57:21 +08:00
parent ac65664dfe
commit d1f756d5c8
7 changed files with 142 additions and 88 deletions

View File

@@ -77,8 +77,8 @@ Authorization: Bearer {{token}}
"imgUris": [
"https://cdn.pixabay.com/photo/2025/10/05/15/06/autumn-9875155_1280.jpg"
],
"title": "测试数据对齐图文笔记5",
"content": "测试数据对齐测试数据对齐测试数据对齐测试5",
"title": "bug修复2",
"content": "bugbugbug",
"topicId": 1
}
@@ -197,16 +197,16 @@ Authorization: Bearer {{token}}
### 笔记点赞入口
POST http://localhost:8000/note/note/like
Content-Type: application/json
Authorization: Bearer {{token}}
Authorization: Bearer {{thirdToken}}
{
"id": 1977249693272375330
"id": 1981698494959714362
}
### 笔记取消点赞入口
POST http://localhost:8000/note/note/unlike
Content-Type: application/json
Authorization: Bearer {{token}}
Authorization: Bearer {{otherToken}}
{
"id": 1977249693272375330
@@ -215,16 +215,16 @@ Authorization: Bearer {{token}}
### 笔记收藏入口
POST http://localhost:8000/note/note/collect
Content-Type: application/json
Authorization: Bearer {{token}}
Authorization: Bearer {{thirdToken}}
{
"id": 1977249693272375330
"id": 1981698494959714362
}
### 笔记取消收藏入口
POST http://localhost:8000/note/note/uncollect
Content-Type: application/json
Authorization: Bearer {{token}}
Authorization: Bearer {{otherToken}}
{
"id": 1977249693272375330