feat(face): 添加购买状态判断逻辑

- 在生成内容时增加对用户是否已购买的判断
- 根据购买状态设置内容的 isBuy 字段
- 调用 orderBiz.isBuy 方法检查购买状态
- 使用 scenicId 和 templateId 作为购买查询条件
This commit is contained in:
2025-11-21 14:03:54 +08:00
parent 0e2122910f
commit 259d99bde7

View File

@@ -465,6 +465,12 @@ public class FaceServiceImpl implements FaceService {
sfpContent.setTemplateCoverUrl(records.getFirst().getResultImageUrl());
sfpContent.setGoodsType(3);
sfpContent.setSort(0);
IsBuyRespVO isBuyRespVO = orderBiz.isBuy(face.getMemberId(), face.getScenicId(), 5, records.getFirst().getTemplateId());
if (isBuyRespVO.isBuy()) {
sfpContent.setIsBuy(1);
} else {
sfpContent.setIsBuy(0);
}
PriceCalculationRequest calculationRequest = new PriceCalculationRequest();
ProductItem productItem = new ProductItem();
productItem.setProductType(ProductType.PHOTO_LOG);