From 13b248c9a378556efce4b8d6c342fe8ad3ba68ea Mon Sep 17 00:00:00 2001 From: lulz1 Date: Thu, 11 Apr 2024 15:44:01 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=80=E6=94=BE=E6=90=BA=E7=A8=8B=E7=81=AB?= =?UTF-8?q?=E8=BD=A6=E5=B7=AE=E6=97=85=E7=94=B3=E8=AF=B7=E5=8D=95=E5=90=8C?= =?UTF-8?q?=E6=AD=A5=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../order_detail/CTripOrderExtensionFactoryImpl.java | 8 ++++++-- .../java/com/chint/domain/service/LegDomainService.java | 6 +++--- .../interfaces/rest/ctrip/in/CTripNoteController.java | 5 +++++ 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/chint/domain/factoriy/order_detail/CTripOrderExtensionFactoryImpl.java b/src/main/java/com/chint/domain/factoriy/order_detail/CTripOrderExtensionFactoryImpl.java index 2d197f0b..e9721857 100644 --- a/src/main/java/com/chint/domain/factoriy/order_detail/CTripOrderExtensionFactoryImpl.java +++ b/src/main/java/com/chint/domain/factoriy/order_detail/CTripOrderExtensionFactoryImpl.java @@ -11,6 +11,8 @@ import com.chint.interfaces.rest.ctrip.dto.search.flight.*; import com.chint.interfaces.rest.ctrip.dto.search.hotel.ClientInfo; import com.chint.interfaces.rest.ctrip.dto.search.hotel.HotelOrderInfoEntity; import com.chint.interfaces.rest.ctrip.dto.search.hotel.PaymentReceived; +import com.chint.interfaces.rest.ctrip.dto.search.train.TrainBasicInfo; +import com.chint.interfaces.rest.ctrip.dto.search.train.TrainOrderInfoEntity; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; @@ -64,9 +66,7 @@ public class CTripOrderExtensionFactoryImpl implements OrderExtensionFactory { .filter(it -> it.getOrderNo().equals(orderNo)) .findFirst() .orElseThrow(() -> new NotFoundException(NOT_FOUND)); - CarOrderDetail carOrderDetail = orderDetailFactory.buildCarWithRouteOrderAndOrderDetail(routeOrder, orderDetail); - //这里要更新用车的状态 OrderEvent lastEvent = orderDetail.getLastEvent(); if (lastEvent != null) { @@ -146,13 +146,17 @@ public class CTripOrderExtensionFactoryImpl implements OrderExtensionFactory { @Override public TrainOrderDetail createTrainOrderDetail(Object trainOrderDetailData) { + TrainOrderInfoEntity trainOrderInfoEntity = (TrainOrderInfoEntity) trainOrderDetailData; + TrainBasicInfo basicInfo = trainOrderInfoEntity.getBasicInfo(); // 携程暂无火车 + return null; } @Override public TrainOrderDetail updateTrainOrderDetailData(TrainOrderDetail flightOrderDetail, Object trainOrderInfo) { // 携程暂无火车 + return null; } diff --git a/src/main/java/com/chint/domain/service/LegDomainService.java b/src/main/java/com/chint/domain/service/LegDomainService.java index cc4a3c4c..522a0d14 100644 --- a/src/main/java/com/chint/domain/service/LegDomainService.java +++ b/src/main/java/com/chint/domain/service/LegDomainService.java @@ -161,9 +161,9 @@ public class LegDomainService { List legItems = routeOrder.getLegItems(); legItems = legItems.stream().filter(it -> !it.getLegType().equals(LEG_TYPE_OTHER)).toList(); - if (supplierName.equals("CTrip")) { - legItems = legItems.stream().filter(it -> !it.getLegType().equals(LEG_TYPE_TRAIN)).toList(); - } +// if (supplierName.equals("CTrip")) { +// legItems = legItems.stream().filter(it -> !it.getLegType().equals(LEG_TYPE_TRAIN)).toList(); +// } List alreadySyncLegs = routeOrder.getRouteRequestList() .stream() diff --git a/src/main/java/com/chint/interfaces/rest/ctrip/in/CTripNoteController.java b/src/main/java/com/chint/interfaces/rest/ctrip/in/CTripNoteController.java index af510619..abbaafac 100644 --- a/src/main/java/com/chint/interfaces/rest/ctrip/in/CTripNoteController.java +++ b/src/main/java/com/chint/interfaces/rest/ctrip/in/CTripNoteController.java @@ -79,6 +79,11 @@ public class CTripNoteController { String productType = cTripStatusNotification.getProductType(); + + if(productType.equals("Train") || productType.equals("OverseaTrain")) { + return Result.Success("暂不接受携程火车数据回推"); + } + String orderStatus = cTripStatusNotification.getOrderStatus(); String orderId = cTripStatusNotification.getOrderId(); String putCTripSign = Digest.getPutCTripStatusSign(cTripStatusNotification.getCorpId(), productType, orderStatus, orderId, C_TRIP_REQUEST_SECRET);