From c2e172aff3beff2a5cb03257831dc0c2b531b527 Mon Sep 17 00:00:00 2001 From: lulz1 Date: Fri, 28 Jun 2024 21:13:44 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E5=90=8C=E6=AD=A5=E9=AB=98=E5=BE=B7?= =?UTF-8?q?=E6=89=93=E8=BD=A6=E5=A6=82=E6=9E=9C=E8=A1=8C=E7=A8=8B=E5=B7=B2?= =?UTF-8?q?=E8=BF=87=E6=9C=9F=E4=BC=9A=E6=8F=90=E9=86=92=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../domain/service/order_sync/AmapOrderSyncAdapter.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/chint/domain/service/order_sync/AmapOrderSyncAdapter.java b/src/main/java/com/chint/domain/service/order_sync/AmapOrderSyncAdapter.java index 4572d6e3..55e448bd 100644 --- a/src/main/java/com/chint/domain/service/order_sync/AmapOrderSyncAdapter.java +++ b/src/main/java/com/chint/domain/service/order_sync/AmapOrderSyncAdapter.java @@ -2,10 +2,7 @@ package com.chint.domain.service.order_sync; import com.chint.domain.aggregates.order.*; import com.chint.domain.aggregates.supplier.AmapRouteRelationship; -import com.chint.domain.aggregates.supplier.Supplier; -import com.chint.domain.aggregates.supplier.SupplierProductStandardLevel; import com.chint.domain.aggregates.user.User; -import com.chint.domain.exceptions.AuthException; import com.chint.domain.exceptions.CommandException; import com.chint.domain.repository.AmapPolicyRepository; import com.chint.domain.repository.AmapRouteRelationshipRepository; @@ -71,6 +68,7 @@ public class AmapOrderSyncAdapter implements SupplierOrderSync { TravelApplicationDto dto = new TravelApplicationDto(); TravelApplicationDto travelApplicationDto = generateTravelApplicationInfo(dto, routeRequest); + Optional byOutApplyRecordId = amapRouteRelationshipRepository .findByOutApplyRecordId(routeRequest.getRouteRequestNo()); TravelApplicationDtoResponse response; @@ -88,6 +86,10 @@ public class AmapOrderSyncAdapter implements SupplierOrderSync { amapRouteRelationshipRepository.save(amapRouteRelationship); } + if (response.getMessage().equals("endTime 已过期")) { + throw new CommandException("你的行程已过期,请添加新的行程"); + } + if (!response.getCode().equals(1)) { Gson gson = new Gson(); log.error(gson.toJson(response));