You've already forked FrameTour-BE
refactor(puzzle): 移除拼图生成记录中的复用逻辑
- 删除 PuzzleGenerationRecordEntity 中的 isDuplicate 和 originalRecordId 字段 - 移除插入记录时设置 isDuplicate 的逻辑 - 删除 FaceMatchingOrchestrator 中查询历史记录的逻辑 - 更新 Mapper XML 文件,移除相关字段和条件判断 - 简化生成流程,不再检查模板是否已生成
This commit is contained in:
@@ -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());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user