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