Commit a729a09e by huluobin

Merge branch 'fix_coupon2' into branch

# Conflicts:
#	src/main/java/com/gogirl/application/market/coupon/impl/MarketServiceImpl.java
parents 39098d3b 71c4f12d
...@@ -48,31 +48,29 @@ import java.util.stream.Collectors; ...@@ -48,31 +48,29 @@ import java.util.stream.Collectors;
public class MarketServiceImpl implements MarketService { public class MarketServiceImpl implements MarketService {
@Resource @Resource
TimesCardUsedRecordMapper timesCardUsedRecordMapper;
@Resource
TimesCardOrderServeDetailMapper timesCardOrderServeDetailMapper;
@Resource
private CouponMapper couponMapper; private CouponMapper couponMapper;
@Resource @Resource
private CouponCustomerRelevanceService couponCustomerRelevanceService; private CouponCustomerRelevanceService couponCustomerRelevanceService;
@Resource @Resource
private CouponOrderRelevanceService couponOrderRelevanceService; private CouponOrderRelevanceService couponOrderRelevanceService;
@Resource @Resource
private OrderManageMapper orderManageMapper; private OrderManageMapper orderManageMapper;
@Resource @Resource
private OrderServeMapper orderServeMapper; private OrderServeMapper orderServeMapper;
@Resource @Resource
private TimesCardCustomerRelevanceMapper timesCardCustomerRelevanceMapper; private TimesCardCustomerRelevanceMapper timesCardCustomerRelevanceMapper;
@Resource @Resource
private CouponCustomerRelevanceMapper couponCustomerRelevanceMapper; private CouponCustomerRelevanceMapper couponCustomerRelevanceMapper;
@Resource @Resource
private OrderServeService orderServeService; private OrderServeService orderServeService;
@Resource @Resource
private TimesCardUsedRecordService timesCardUsedRecordService; private TimesCardUsedRecordService timesCardUsedRecordService;
@Resource @Resource
private TimesCardCustomerRelevanceService timesCardCustomerRelevanceService; private TimesCardCustomerRelevanceService timesCardCustomerRelevanceService;
@Resource @Resource
private DiscountConfigMapper discountConfigMapper; private DiscountConfigMapper discountConfigMapper;
...@@ -264,11 +262,6 @@ public class MarketServiceImpl implements MarketService { ...@@ -264,11 +262,6 @@ public class MarketServiceImpl implements MarketService {
} }
} }
@Resource
TimesCardUsedRecordMapper timesCardUsedRecordMapper;
@Resource
TimesCardOrderServeDetailMapper timesCardOrderServeDetailMapper;
/** /**
* 更新订单 使用次卡 使用外部券 使用内部券之后需要调用这个方法 * 更新订单 使用次卡 使用外部券 使用内部券之后需要调用这个方法
* 结算订单 * 结算订单
...@@ -593,6 +586,9 @@ public class MarketServiceImpl implements MarketService { ...@@ -593,6 +586,9 @@ public class MarketServiceImpl implements MarketService {
.filter(couponCustomerRelevance -> couponCustomerRelevance.getType().equals(CouponCustomerRelevance.TYPE_DISCOUNT)) .filter(couponCustomerRelevance -> couponCustomerRelevance.getType().equals(CouponCustomerRelevance.TYPE_DISCOUNT))
.collect(Collectors.toList()); .collect(Collectors.toList());
discountInnerCouponCustomerRelevanceServiceList.forEach(couponCustomerRelevanceConsumer); discountInnerCouponCustomerRelevanceServiceList.forEach(couponCustomerRelevanceConsumer);
if (normalInnerCouponCustomerRelevanceServiceList.size() > 1) {
throw new RRException("普通内部券只能用一张");
}
} }
orderManageMapper.updateById(orderManage); orderManageMapper.updateById(orderManage);
...@@ -600,15 +596,6 @@ public class MarketServiceImpl implements MarketService { ...@@ -600,15 +596,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) { private List<OrderServe> queryCanDiscount(OrderManage orderManage, List<Integer> serveIds, Integer counponId) {
List<Integer> freeCouponIds = discountConfigMapper.selectList(new LambdaQueryWrapper<>()).stream().map(DiscountConfig::getCouponId) List<Integer> freeCouponIds = discountConfigMapper.selectList(new LambdaQueryWrapper<>()).stream().map(DiscountConfig::getCouponId)
......
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