|
@@ -103,6 +103,9 @@ public class TradeCouponPriceCalculator implements TradePriceCalculator {
|
|
|
if (PromotionProductScopeEnum.SPU.getScope().equals(coupon.getProductScope())) {
|
|
|
matchPredicate = matchPredicate // 额外加如下条件
|
|
|
.and(orderItem -> coupon.getProductScopeValues().contains(orderItem.getSpuId()));
|
|
|
+ } else if (PromotionProductScopeEnum.CATEGORY.getScope().equals(coupon.getProductScope())) {
|
|
|
+ matchPredicate = matchPredicate // 额外加如下条件
|
|
|
+ .and(orderItem -> coupon.getProductScopeValues().contains(orderItem.getCategoryId()));
|
|
|
}
|
|
|
return filterList(result.getItems(), matchPredicate);
|
|
|
}
|