refactor(puzzle): 优化拼图模板生成逻辑

- 移除 Redis 缓存检查机制
- 改用 PuzzleRepository 直接查询拼图模板数据
- 更新日志记录格式,使用 e.getMessage() 替代完整异常对象
- 调整依赖注入顺序,添加 PuzzleRepository 注入
- 简化模板列表查询逻辑,提升代码可读性
This commit is contained in:
2026-01-07 15:01:04 +08:00
parent d3884c8aa2
commit 917668da0c
2 changed files with 2 additions and 2 deletions

View File

@@ -102,7 +102,7 @@ public class PuzzleGenerationOrchestrator {
} catch (Exception e) {
// 异步任务失败不影响主流程,仅记录日志
log.error("异步生成拼图模板失败: scenicId={}, faceId={}", scenicId, faceId, e);
log.error("异步生成拼图模板失败: scenicId={}, faceId={}, e={}", scenicId, faceId, e.getMessage());
}
}, "PuzzleTemplateGenerator-" + scenicId + "-" + faceId).start();
}

View File

@@ -427,7 +427,7 @@ public class FaceMatchingOrchestrator {
} catch (Exception e) {
// 异步任务失败不影响主流程,仅记录日志
log.error("异步生成拼图模板失败: scenicId={}, faceId={}", scenicId, faceId, e);
log.error("异步生成拼图模板失败: scenicId={}, faceId={}, e={}", scenicId, faceId, e.getMessage());
}
});
}