异步提交充电订单同步
This commit is contained in:
@ -1237,15 +1237,21 @@ public class OrderServiceImpl implements OrderService {
|
||||
carRepo.update(carPOLambdaUpdateWrapper);
|
||||
|
||||
if(renBatteryOrderSubPO!=null){
|
||||
Map<String, String> result = syncInteg.sendSubOrderId(renBatteryOrderSubPO.getSuborderId());
|
||||
String status = result.get("code");
|
||||
if (status.equals("40001") || status.equals("40002") || status.equals("40003") || status.equals("40005") || status.equals("40006")){
|
||||
throw new BizException("此用户在租电APP还有未完成的订单,请联系用户完成租电订单或是驳回此租车订单");
|
||||
}
|
||||
|
||||
ThreadPoolUtils.getThreadPool().execute(() -> {
|
||||
try {
|
||||
Map<String, String> result = syncInteg.sendSubOrderId(renBatteryOrderSubPO.getSuborderId());
|
||||
String status = result.get("code");
|
||||
if (status.equals("40001") || status.equals("40002") || status.equals("40003") || status.equals("40005") || status.equals("40006")){
|
||||
log.warn("租电订单同步失败,用户在租电APP还有未完成的订单,subOrderId: {}", renBatteryOrderSubPO.getSuborderId());
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("异步同步租电订单异常,subOrderId: {}", renBatteryOrderSubPO.getSuborderId(), e);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
return getOrderInfoByOrderNo(bindCarToOrderReq.getOrderNo());
|
||||
} catch (Exception e){
|
||||
log.warn("绑定车辆失败",e);
|
||||
|
||||
Reference in New Issue
Block a user