|
@@ -725,8 +725,9 @@ public class OrderMainServiceImpl extends ServiceImpl<OrderMainMapper, OrderMain
|
|
|
|
|
|
|
|
// 5. 批量插入订单商品
|
|
// 5. 批量插入订单商品
|
|
|
orderProductMapper.insertBatch(orderProducts);
|
|
orderProductMapper.insertBatch(orderProducts);
|
|
|
-
|
|
|
|
|
- remoteErpPushService.pushOrderData(orderMainInfoToJson(orderId), false);
|
|
|
|
|
|
|
+ if (!needAffirmOrder) {
|
|
|
|
|
+ remoteErpPushService.pushOrderData(orderMainInfoToJson(orderId), false);
|
|
|
|
|
+ }
|
|
|
log.info("成功新增订单,ID: {}", orderId);
|
|
log.info("成功新增订单,ID: {}", orderId);
|
|
|
return orderId;
|
|
return orderId;
|
|
|
} catch (RuntimeException e) {
|
|
} catch (RuntimeException e) {
|
|
@@ -833,7 +834,9 @@ public class OrderMainServiceImpl extends ServiceImpl<OrderMainMapper, OrderMain
|
|
|
if (bo.getPlaceOrderType() == 1) {
|
|
if (bo.getPlaceOrderType() == 1) {
|
|
|
remoteProductShoppingCartService.deleteWithValidByIds(bo.getProductShoppingCartId());
|
|
remoteProductShoppingCartService.deleteWithValidByIds(bo.getProductShoppingCartId());
|
|
|
}
|
|
}
|
|
|
- remoteErpPushService.pushOrderData(orderMainInfoToJson(orderId), false);
|
|
|
|
|
|
|
+ if (!affirmFlag) {
|
|
|
|
|
+ remoteErpPushService.pushOrderData(orderMainInfoToJson(orderId), false);
|
|
|
|
|
+ }
|
|
|
return orderId;
|
|
return orderId;
|
|
|
} else {
|
|
} else {
|
|
|
// 插入失败,抛出异常触发事务回滚
|
|
// 插入失败,抛出异常触发事务回滚
|