|
|
@ -82,6 +82,9 @@ public class OrderServiceImpl implements OrderService { |
|
|
|
@Resource |
|
|
|
@Resource |
|
|
|
private ThirdProductConfig thirdProductConfig; |
|
|
|
private ThirdProductConfig thirdProductConfig; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Resource |
|
|
|
|
|
|
|
private HighDiscountPackageActualService discountPackageActualService; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public HighOrder insertOrderData(HighOrder order) { |
|
|
|
public HighOrder insertOrderData(HighOrder order) { |
|
|
@ -220,6 +223,17 @@ public class OrderServiceImpl implements OrderService { |
|
|
|
} else if (child.getGoodsType().equals(OrderChildGoodsType.TYPE7.getNumber())) { |
|
|
|
} else if (child.getGoodsType().equals(OrderChildGoodsType.TYPE7.getNumber())) { |
|
|
|
order.setProductType(OrderProductType.PRODUCT_TYPE7.getNumber()); |
|
|
|
order.setProductType(OrderProductType.PRODUCT_TYPE7.getNumber()); |
|
|
|
HighChildOrder childOrder = orderCreateHandleService.couponPackage(child); |
|
|
|
HighChildOrder childOrder = orderCreateHandleService.couponPackage(child); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 查询库存
|
|
|
|
|
|
|
|
List<HighDiscountPackageActual> list = discountPackageActualService.getListByPackageId(childOrder.getGoodsId().intValue(), 1); |
|
|
|
|
|
|
|
if (list == null || list.size() == 0) { |
|
|
|
|
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.COUPON_STOCK_INSUFFICIENT, ""); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
list.get(0).setUserId(order.getMemId().intValue()); |
|
|
|
|
|
|
|
list.get(0).setExt1(childOrder.getOrderNo()); |
|
|
|
|
|
|
|
list.get(0).setStatus(2); // 状态: 1: 待分配 2:预分配(售卖)3:已分配
|
|
|
|
|
|
|
|
discountPackageActualService.updateHighDiscountPackageActual(list.get(0)); |
|
|
|
|
|
|
|
|
|
|
|
childOrderList.add(childOrder); |
|
|
|
childOrderList.add(childOrder); |
|
|
|
order.setTitle(childOrder.getGoodsName()); |
|
|
|
order.setTitle(childOrder.getGoodsName()); |
|
|
|
|
|
|
|
|
|
|
|