lzh
23cf3b62b2
fix(ops): 修复巡检异步处理的 @Async 自调用和事务可见性问题
Code review 发现两个关键缺陷:
1. @Async 自调用:triggerAttributionAsync() 在同一类内调用,
Spring AOP 代理不生效,实际同步执行
2. 事务可见性:异步任务可能在事务提交前读取未持久化数据
修复方案:
- 提取 InspectionAsyncHandler(独立 @Component),@Async 通过代理生效
- 使用 TransactionSynchronizationManager.afterCommit() 确保事务提交后触发
- 修复 InspectionRectificationServiceImpl 的 null 安全问题
- 修复 InspectionTemplateServiceImpl 更新路径缺少 id 空校验
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 19:30:01 +08:00
..
2026-03-05 19:30:01 +08:00
2025-12-31 16:49:44 +08:00
2026-03-05 19:15:01 +08:00
2026-03-01 16:09:17 +08:00
2026-03-05 19:15:01 +08:00
2025-12-31 16:49:44 +08:00
2025-12-31 16:49:44 +08:00
2025-12-31 16:49:44 +08:00