diff --git a/hai-cweb/src/main/java/com/cweb/controller/HighUserDiscountController.java b/hai-cweb/src/main/java/com/cweb/controller/HighUserDiscountController.java index 64faa497..a226f837 100644 --- a/hai-cweb/src/main/java/com/cweb/controller/HighUserDiscountController.java +++ b/hai-cweb/src/main/java/com/cweb/controller/HighUserDiscountController.java @@ -305,20 +305,19 @@ public class HighUserDiscountController { if (goodsType.getType().equals(OrderChildGoodsTypeEnum.type3.getType())) { // 过滤出加油服务的加油券 - List collect = userDiscountList.stream().filter(o -> o.getHighDiscount().getUseScope().equals(DiscountUseScope.type7.getType())).collect(Collectors.toList()); + List collect = userDiscountList.stream() + .filter(o -> o.getDiscountUseScope().equals(DiscountUseScope.type7.getType()) || o.getDiscountUseScope().equals(DiscountUseScope.type1.getType())) + .collect(Collectors.toList()); for (HighDiscountUserRel userDiscount : collect) { // 满减 - if (userDiscount.getHighDiscount().getDiscountType().equals(1)) { - if (body.getBigDecimal("goodsPrice").compareTo(userDiscount.getHighDiscount().getDiscountCondition()) >= 0) { + if (userDiscount.getDiscountType().equals(1)) { + if (body.getBigDecimal("goodsPrice").compareTo(userDiscount.getDiscountCondition()) >= 0) { list.add(userDiscount); } } - - if (userDiscount.getHighDiscount().getDiscountType().equals(2) - || userDiscount.getHighDiscount().getDiscountType().equals(3)) { + if (userDiscount.getDiscountType().equals(2) || userDiscount.getDiscountType().equals(3)) { list.add(userDiscount); } - } } list.sort(Comparator.comparing(o -> o.getUseEndTime()));