feat(puzzle): 动态设置拼图名称

- 注入PuzzleTemplateMapper依赖
- 根据模板ID获取拼图模板名称
- 使用模板名称替换硬编码的"三拼图"名称
This commit is contained in:
2025-11-21 17:07:24 +08:00
parent f4a3dc9cae
commit 8f918570d9

View File

@@ -186,6 +186,7 @@ public class FaceServiceImpl implements FaceService {
private PuzzleGenerationRecordMapper puzzleGenerationRecordMapper;
@Autowired
private IPriceCalculationService iPriceCalculationService;
@Autowired
private PuzzleTemplateMapper puzzleTemplateMapper;
@Override
@@ -458,7 +459,7 @@ public class FaceServiceImpl implements FaceService {
ContentPageVO sfpContent = new ContentPageVO();
List<PuzzleGenerationRecordEntity> records = puzzleGenerationRecordMapper.listByFaceId(faceId);
PuzzleTemplateEntity template = puzzleTemplateMapper.getById(records.getFirst().getTemplateId());
sfpContent.setName("三拼图");
sfpContent.setName(template.getName());
sfpContent.setGroup("plog");
sfpContent.setScenicId(face.getScenicId());
sfpContent.setContentType(3);