Commit 71c4f12d by huluobin

内部券使用

parent 0b362d2e
......@@ -48,31 +48,29 @@ import java.util.stream.Collectors;
public class MarketServiceImpl implements MarketService {
@Resource
TimesCardUsedRecordMapper timesCardUsedRecordMapper;
@Resource
TimesCardOrderServeDetailMapper timesCardOrderServeDetailMapper;
@Resource
private CouponMapper couponMapper;
@Resource
private CouponCustomerRelevanceService couponCustomerRelevanceService;
@Resource
private CouponOrderRelevanceService couponOrderRelevanceService;
@Resource
private OrderManageMapper orderManageMapper;
@Resource
private OrderServeMapper orderServeMapper;
@Resource
private TimesCardCustomerRelevanceMapper timesCardCustomerRelevanceMapper;
@Resource
private CouponCustomerRelevanceMapper couponCustomerRelevanceMapper;
@Resource
private OrderServeService orderServeService;
@Resource
private TimesCardUsedRecordService timesCardUsedRecordService;
@Resource
private TimesCardCustomerRelevanceService timesCardCustomerRelevanceService;
@Resource
private DiscountConfigMapper discountConfigMapper;
......@@ -264,11 +262,6 @@ public class MarketServiceImpl implements MarketService {
}
}
@Resource
TimesCardUsedRecordMapper timesCardUsedRecordMapper;
@Resource
TimesCardOrderServeDetailMapper timesCardOrderServeDetailMapper;
/**
* 更新订单 使用次卡 使用外部券 使用内部券之后需要调用这个方法
* 结算订单
......@@ -574,6 +567,9 @@ public class MarketServiceImpl implements MarketService {
.filter(couponCustomerRelevance -> !discountConfigListCouponId.contains(couponCustomerRelevance.getCouponId()))
.collect(Collectors.toList());
normalInnerCouponCustomerRelevanceServiceList.forEach(couponCustomerRelevanceConsumer);
if (normalInnerCouponCustomerRelevanceServiceList.size() > 1) {
throw new RRException("普通内部券只能用一张");
}
}
orderManageMapper.updateById(orderManage);
......@@ -581,15 +577,6 @@ public class MarketServiceImpl implements MarketService {
}
@Data
static class CalcFreePay {
private Integer orderServeId;
private List<Integer> serveIds = new ArrayList<>();
private BigDecimal payPrice;
}
private List<OrderServe> queryCanDiscount(OrderManage orderManage, List<Integer> serveIds, Integer counponId) {
List<Integer> freeCouponIds = discountConfigMapper.selectList(new LambdaQueryWrapper<>()).stream().map(DiscountConfig::getCouponId)
......@@ -695,5 +682,14 @@ public class MarketServiceImpl implements MarketService {
.orElse(null);
}
@Data
static class CalcFreePay {
private Integer orderServeId;
private List<Integer> serveIds = new ArrayList<>();
private BigDecimal payPrice;
}
}
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