|
@@ -113,6 +113,7 @@ public class ProductOrderFacade extends ProductOrderServiceImpl {
|
|
|
throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "添加订单失败");
|
|
|
}
|
|
|
OrderDetails orderDetails = null;
|
|
|
+ List<OrderDetails> list =new ArrayList();
|
|
|
for (Long o : addOrderVO.getProductId()) {
|
|
|
LantoneProduct lantoneProduct = lantoneProductFacade.selectLanProduct(o);
|
|
|
if (null == lantoneProduct) {
|
|
@@ -124,7 +125,10 @@ public class ProductOrderFacade extends ProductOrderServiceImpl {
|
|
|
orderDetails.setGmtCreate(DateUtil.now());
|
|
|
orderDetails.setCreator(UserUtils.getCurrentPrincipleID());
|
|
|
orderDetails.setProductId(o);
|
|
|
- orderDetailsFacade.save(orderDetails);
|
|
|
+ list.add(orderDetails);
|
|
|
+ }
|
|
|
+ if(orderDetailsFacade.saveOrderDetails(list)){
|
|
|
+ throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "添加订单失败");
|
|
|
}
|
|
|
return true;
|
|
|
}
|