增加套餐验证接口调用

This commit is contained in:
2025-09-30 15:56:12 +08:00
parent dab12a4b98
commit a97513c33f
3 changed files with 26 additions and 2 deletions

View File

@ -1177,7 +1177,7 @@ public class OrderServiceImpl implements OrderService {
.last(" limit 1");
OrderSubPO renBatteryOrderSubPO = orderSubRepo.getOne(querySubBatteryWrapper);
if(renBatteryOrderSubPO!=null){
Map<String, String> result = syncInteg.sendSubOrderId(renBatteryOrderSubPO.getSuborderId());
Map<String, String> result = syncInteg.sendUserMeal(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还有未完成的订单请联系用户完成租电订单或是驳回此租车订单");
@ -1236,6 +1236,15 @@ public class OrderServiceImpl implements OrderService {
.set(CarPO::getBrsStatus, CarStatusEnum.RENT_ING.getCode());
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还有未完成的订单请联系用户完成租电订单或是驳回此租车订单");
}
}
return getOrderInfoByOrderNo(bindCarToOrderReq.getOrderNo());
} catch (Exception e){

View File

@ -12,4 +12,7 @@ public interface SyncFacade {
@GetMapping("/send/subOrder/{subOrderId}")
Map<String, String> sendSubOrderId(@PathVariable Long subOrderId);
@GetMapping("/OrderMeal/{subOrderId}")
Map<String, String> sendUserMeal(@PathVariable Long subOrderId);
}

View File

@ -29,6 +29,18 @@ public class SyncInteg {
return null;
}
public Map<String, String> sendUserMeal(Long subOrderId){
try{
Map<String, String> result = syncFacade.sendUserMeal(subOrderId);
if( "200".equals(result.get("code"))){
return result;
}else{
return result;
}
} catch (Exception e){
log.error("发送租电订单查询失败",e);
}
return null;
}
}