|
|
@ -61,7 +61,8 @@ public class HighOrderServiceImpl implements HighOrderService { |
|
|
|
public void insertOrder(HighOrder highOrder) throws Exception { |
|
|
|
public void insertOrder(HighOrder highOrder) throws Exception { |
|
|
|
highOrderMapper.insert(highOrder); |
|
|
|
highOrderMapper.insert(highOrder); |
|
|
|
|
|
|
|
|
|
|
|
for (HighChildOrder childOrder : highOrder.getHighChildOrderList()) { |
|
|
|
for (int i = 0; i < highOrder.getHighChildOrderList().size();i++) { |
|
|
|
|
|
|
|
HighChildOrder childOrder = highOrder.getHighChildOrderList().get(i); |
|
|
|
childOrder.setOrderId(highOrder.getId()); |
|
|
|
childOrder.setOrderId(highOrder.getId()); |
|
|
|
highChildOrderMapper.insert(childOrder); |
|
|
|
highChildOrderMapper.insert(childOrder); |
|
|
|
|
|
|
|
|
|
|
@ -86,7 +87,6 @@ public class HighOrderServiceImpl implements HighOrderService { |
|
|
|
// 查看是否需要赠送卡卷
|
|
|
|
// 查看是否需要赠送卡卷
|
|
|
|
List<HighCouponHandselModel> handselListByCoupon = highCouponHandselService.getHandselListByCoupon(childOrder.getGoodsId()); |
|
|
|
List<HighCouponHandselModel> handselListByCoupon = highCouponHandselService.getHandselListByCoupon(childOrder.getGoodsId()); |
|
|
|
if (handselListByCoupon != null && handselListByCoupon.size() > 0) { |
|
|
|
if (handselListByCoupon != null && handselListByCoupon.size() > 0) { |
|
|
|
List<HighChildOrder> handselChildOrderList = new ArrayList<>(); |
|
|
|
|
|
|
|
for (HighCouponHandsel highCouponHandsel : handselListByCoupon) { |
|
|
|
for (HighCouponHandsel highCouponHandsel : handselListByCoupon) { |
|
|
|
// 查询卡卷信息
|
|
|
|
// 查询卡卷信息
|
|
|
|
HighCouponModel coupon = highCouponService.getCouponById(highCouponHandsel.getHandselCouponId()); |
|
|
|
HighCouponModel coupon = highCouponService.getCouponById(highCouponHandsel.getHandselCouponId()); |
|
|
@ -109,10 +109,9 @@ public class HighOrderServiceImpl implements HighOrderService { |
|
|
|
highChildOrder.setGiveawayType(true); // 是否是赠品 0:否 1:是
|
|
|
|
highChildOrder.setGiveawayType(true); // 是否是赠品 0:否 1:是
|
|
|
|
highChildOrder.setChildOrdeStatus(1); // 1 待支付 2 已支付 3.已完成 4. 已退款 5.已取消
|
|
|
|
highChildOrder.setChildOrdeStatus(1); // 1 待支付 2 已支付 3.已完成 4. 已退款 5.已取消
|
|
|
|
highChildOrder.setPraiseStatus(0); |
|
|
|
highChildOrder.setPraiseStatus(0); |
|
|
|
handselChildOrderList.add(highChildOrder); |
|
|
|
highOrder.getHighChildOrderList().add(highChildOrder); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
highOrder.getHighChildOrderList().addAll(handselChildOrderList); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|