异步提交充电订单同步

This commit is contained in:
2025-10-03 12:32:43 +08:00
parent 53f98d9174
commit b3ba5ef5b1

View File

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