diff --git a/src/main/java/com/chint/application/queryies/OrderQuery.java b/src/main/java/com/chint/application/queryies/OrderQuery.java index 42f2e615..818a0123 100644 --- a/src/main/java/com/chint/application/queryies/OrderQuery.java +++ b/src/main/java/com/chint/application/queryies/OrderQuery.java @@ -511,7 +511,9 @@ public class OrderQuery { List legItems = routeOrder.getLegItems(); if (legItems != null && !legItems.isEmpty()) { //这里使用领域事件进行检查leg的订单状态 ,用户每次想要查看行程都会进行一次检查 - legItems.forEach(leg -> legDomainService.legCheckOrder(leg)); + if (routeOrder.getApprovalStatusCode() != APPROVAL_EVENT_PREPARE) { + legItems.forEach(leg -> legDomainService.legCheckOrder(leg)); + } legDomainService.queryLocation(legItems); List list = legItems.stream().map(LegRes::copyFrom).toList(); routeOrderRes.setLegResList(list); diff --git a/src/main/java/com/chint/application/services/OrderApplicationService.java b/src/main/java/com/chint/application/services/OrderApplicationService.java index 97dd5ae9..09b154d0 100644 --- a/src/main/java/com/chint/application/services/OrderApplicationService.java +++ b/src/main/java/com/chint/application/services/OrderApplicationService.java @@ -176,6 +176,9 @@ public class OrderApplicationService { .newleg(leg) .changeType(1) .sendToQueue(); + + //如果行程变更成功,自动执行同步功能 + Command.of(RouteAutoSyncCommand.class).route(routeOrder).async().sendToQueue(); } private Leg handleLegChangeEvent(Leg leg, LegData legData) { diff --git a/src/main/java/com/chint/interfaces/rest/ctrip/tools/CTripUtils.java b/src/main/java/com/chint/interfaces/rest/ctrip/tools/CTripUtils.java index 4b81f124..a818f80d 100644 --- a/src/main/java/com/chint/interfaces/rest/ctrip/tools/CTripUtils.java +++ b/src/main/java/com/chint/interfaces/rest/ctrip/tools/CTripUtils.java @@ -166,7 +166,7 @@ public class CTripUtils { case "Submitted" -> OrderConstant.ORDER_EVENT_PREPARE; // "已提交"映射到准备状态 case "Confirmed" -> OrderConstant.ORDER_EVENT_ORDERED; // "已客户确认"映射到已下单 case "Cancelled" -> OrderConstant.ORDER_EVENT_REFUND; // "已取消"映射到取消 - case "Refunded" -> OrderConstant.ORDER_EVENT_REFUND; // "已取消"映射到取消 + case "Refunded" -> OrderConstant.ORDER_EVENT_REFUND; // "已退款"映射到取消 case "Wait" -> // "确认中"可能表示订单正在处理中,但没有直接映射,可能需要新的状态常量 OrderConstant.ORDER_EVENT_ORDERED;