Commit fa58fb0e by huluobin

普通内部券

parent 0b362d2e
......@@ -470,8 +470,6 @@ public class MarketServiceImpl implements MarketService {
});
}
//4、内部券
if (ListUtil.isNotEmpty(innerCouponCustomerRelevanceServiceList)) {
//删除之前的内部券抵扣情况记录
......@@ -573,6 +571,9 @@ public class MarketServiceImpl implements MarketService {
.stream()
.filter(couponCustomerRelevance -> !discountConfigListCouponId.contains(couponCustomerRelevance.getCouponId()))
.collect(Collectors.toList());
if (normalInnerCouponCustomerRelevanceServiceList.size() > 1) {
throw new RRException("普通内部券只能用一张");
}
normalInnerCouponCustomerRelevanceServiceList.forEach(couponCustomerRelevanceConsumer);
}
......@@ -651,12 +652,16 @@ public class MarketServiceImpl implements MarketService {
});
Optional<CalcFreePay> max = calcFreePayList.stream().max(Comparator.comparing(CalcFreePay::getPayPrice));
return orderManage.getListOrderServer().stream().filter(orderServe ->
max.map(calcFreePay -> {
calcFreePay.getServeIds().add(calcFreePay.getOrderServeId());
return calcFreePay.getServeIds();
}).orElse(new ArrayList<>())
.contains(orderServe.getId()))
return orderManage.getListOrderServer()
.stream()
.filter(orderServe ->
max.map(calcFreePay -> {
//主服务和辅助服务一起
calcFreePay.getServeIds().add(calcFreePay.getOrderServeId());
return calcFreePay.getServeIds();
}).orElse(new ArrayList<>())
//是否包括
.contains(orderServe.getId()))
.collect(Collectors.toList());
} else {
......@@ -665,17 +670,12 @@ public class MarketServiceImpl implements MarketService {
.filter(orderServe -> serveIds.contains(orderServe.getServeId()))
.filter(orderServe -> !orderServe.isActivity())
.filter(orderServe -> orderServe.getBindTimesCard() == 2)
.filter(orderServe -> orderServe.getBindTimesCard() == 2)
.filter(orderServe -> orderServe.getBindOuterCoupon() == 2)
.collect(Collectors.toList());
}
}
private OrderServe querySupportServe(OrderManage orderManage, OrderServe orderServe) {
return null;
}
/**
* serviceIds 中支付金额最多的订单服务
*
......
......@@ -201,8 +201,13 @@ public class OrderServe implements Serializable {
// @ApiModelProperty("是否已经被卡券或者次卡折扣过 1-已经绑定了次卡或者优惠券 2-未绑定")
// private Integer bindCoupon = 2;
@ApiModelProperty("是否已经绑定了内部券 1-已经绑定了内部券 2-未绑定")
private Integer bindInnerCoupon = 2;
@ApiModelProperty("是否已经绑定了外部券 1-已经绑定了外部券 2-未绑定")
private Integer bindOuterCoupon = 2;
@ApiModelProperty("是否已经绑定了次卡 1-已经绑定了次卡 2-未绑定")
private Integer bindTimesCard = 2;
@TableField(strategy = FieldStrategy.IGNORED)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment