You've already forked FrameTour-BE
refactor(order): 调整图像处理逻辑与订单兼容性设置
- 将图像处理逻辑移至事务提交后执行 - 添加订单内容不可下载标识兼容旧逻辑 - 移除冗余的券服务注入依赖 - 清理订单相关缓存以确保数据一致性
This commit is contained in:
@@ -51,8 +51,6 @@ public class SourceRepository {
|
||||
@Autowired
|
||||
private RedisTemplate<String, String> redisTemplate;
|
||||
@Autowired
|
||||
private IVoucherService iVoucherService;
|
||||
@Autowired
|
||||
private FaceRepository faceRepository;
|
||||
@Autowired
|
||||
private TemplateRepository templateRepository;
|
||||
@@ -75,11 +73,6 @@ public class SourceRepository {
|
||||
type = 3; // compact
|
||||
}
|
||||
|
||||
// 如果需要图像处理,对该faceId下的所有type=3的照片进行处理
|
||||
if (needsImageProcessing) {
|
||||
processAiCamImages(faceId);
|
||||
}
|
||||
|
||||
MemberSourceEntity memberSource = new MemberSourceEntity();
|
||||
memberSource.setMemberId(memberId);
|
||||
memberSource.setFaceId(faceId);
|
||||
@@ -88,6 +81,13 @@ public class SourceRepository {
|
||||
memberSource.setIsBuy(1);
|
||||
sourceMapper.updateRelation(memberSource);
|
||||
memberRelationRepository.clearSCacheByFace(faceId);
|
||||
|
||||
// 如果需要图像处理,对该faceId下的所有type=3的照片进行处理
|
||||
if (needsImageProcessing) {
|
||||
processAiCamImages(faceId);
|
||||
}
|
||||
|
||||
redisTemplate.delete("order_content_not_downloadable_" + orderId);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user