提交代码

dev-discount
胡锐 2 years ago
parent 3c5b3f545f
commit 91d3f254aa
  1. 13
      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<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) {
// 满减
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()));

Loading…
Cancel
Save