promotion: 优惠券模板 productSpuIds 改成 productScopeValues

This commit is contained in:
owen
2023-09-02 09:53:37 +08:00
parent 6a7be19d3a
commit 8bbaaf1ce9
9 changed files with 19 additions and 19 deletions

View File

@@ -102,7 +102,7 @@ public class TradeCouponPriceCalculator implements TradePriceCalculator {
Predicate<TradePriceCalculateRespBO.OrderItem> matchPredicate = TradePriceCalculateRespBO.OrderItem::getSelected;
if (PromotionProductScopeEnum.SPU.getScope().equals(coupon.getProductScope())) {
matchPredicate = matchPredicate // 额外加如下条件
.and(orderItem -> coupon.getProductSpuIds().contains(orderItem.getSpuId()));
.and(orderItem -> coupon.getProductScopeValues().contains(orderItem.getSpuId()));
}
return filterList(result.getItems(), matchPredicate);
}