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));