refactor(puzzle): 移除拼图生成记录中的复用逻辑

- 删除 PuzzleGenerationRecordEntity 中的 isDuplicate 和 originalRecordId 字段
- 移除插入记录时设置 isDuplicate 的逻辑
- 删除 FaceMatchingOrchestrator 中查询历史记录的逻辑
- 更新 Mapper XML 文件,移除相关字段和条件判断
- 简化生成流程,不再检查模板是否已生成
This commit is contained in:
2025-11-21 11:41:11 +08:00
parent d5fc5c2565
commit a860319ea1
4 changed files with 3 additions and 27 deletions

View File

@@ -369,7 +369,6 @@ public class FaceMatchingOrchestrator {
return;
}
ScenicV2DTO scenicBasic = scenicRepository.getScenicBasic(face.getScenicId());
List<PuzzleGenerationRecordEntity> records = puzzleGenerationRecordMapper.listByFaceId(faceId);
// 准备公共动态数据
Map<String, String> baseDynamicData = new HashMap<>();
@@ -387,11 +386,6 @@ public class FaceMatchingOrchestrator {
int failCount = 0;
for (PuzzleTemplateDTO template : templateList) {
try {
boolean anyMatch = records.stream().anyMatch(record -> record.getTemplateCode().equals(template.getCode()));
if (anyMatch) {
log.info("模板已生成,跳过");
continue;
}
log.info("开始生成拼图: scenicId={}, templateCode={}, templateName={}",
scenicId, template.getCode(), template.getName());