You've already forked FrameTour-BE
feat(pricing): 添加折扣优先级设置并优化价格计算请求
- 在折扣信息中增加优先级字段,提升折扣策略的灵活性 - 为价格计算请求默认启用自动使用优惠券功能 - 设置价格预览模式为非预览状态,确保实际计算准确性 - 完善打印服务中的价格计算逻辑,提高系统稳定性
This commit is contained in:
@@ -83,6 +83,7 @@ public class OnePricePurchaseDiscountProvider implements IDiscountProvider {
|
||||
discountInfo.setDiscountAmount(onePriceInfo.getActualDiscountAmount());
|
||||
discountInfo.setDiscountDescription("景区一口价购买,价格更优惠");
|
||||
discountInfo.setOnePriceInfo(onePriceInfo);
|
||||
discountInfo.setPriority(getPriority());
|
||||
|
||||
discounts.add(discountInfo);
|
||||
|
||||
|
||||
@@ -454,6 +454,7 @@ public class PrinterServiceImpl implements PrinterService {
|
||||
memberId, faceId, scenicId, e.getMessage());
|
||||
}
|
||||
}
|
||||
request.setAutoUseCoupon(true);
|
||||
|
||||
// 使用统一价格计算服务
|
||||
PriceCalculationResult result = priceCalculationService.calculatePrice(request);
|
||||
@@ -669,6 +670,8 @@ public class PrinterServiceImpl implements PrinterService {
|
||||
}
|
||||
|
||||
request.setProducts(productItems);
|
||||
request.setAutoUseCoupon(true);
|
||||
request.setPreviewOnly(false);
|
||||
|
||||
PriceCalculationResult priceResult = priceCalculationService.calculatePrice(request);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user