fix: 查询临时订单出错的bug
This commit is contained in:
parent
01ad704f98
commit
a62de4dc4a
|
@ -511,7 +511,9 @@ public class OrderQuery {
|
||||||
List<Leg> legItems = routeOrder.getLegItems();
|
List<Leg> legItems = routeOrder.getLegItems();
|
||||||
if (legItems != null && !legItems.isEmpty()) {
|
if (legItems != null && !legItems.isEmpty()) {
|
||||||
//这里使用领域事件进行检查leg的订单状态 ,用户每次想要查看行程都会进行一次检查
|
//这里使用领域事件进行检查leg的订单状态 ,用户每次想要查看行程都会进行一次检查
|
||||||
legItems.forEach(leg -> legDomainService.legCheckOrder(leg));
|
if (routeOrder.getApprovalStatusCode() != APPROVAL_EVENT_PREPARE) {
|
||||||
|
legItems.forEach(leg -> legDomainService.legCheckOrder(leg));
|
||||||
|
}
|
||||||
legDomainService.queryLocation(legItems);
|
legDomainService.queryLocation(legItems);
|
||||||
List<LegRes> list = legItems.stream().map(LegRes::copyFrom).toList();
|
List<LegRes> list = legItems.stream().map(LegRes::copyFrom).toList();
|
||||||
routeOrderRes.setLegResList(list);
|
routeOrderRes.setLegResList(list);
|
||||||
|
|
|
@ -176,6 +176,9 @@ public class OrderApplicationService {
|
||||||
.newleg(leg)
|
.newleg(leg)
|
||||||
.changeType(1)
|
.changeType(1)
|
||||||
.sendToQueue();
|
.sendToQueue();
|
||||||
|
|
||||||
|
//如果行程变更成功,自动执行同步功能
|
||||||
|
Command.of(RouteAutoSyncCommand.class).route(routeOrder).async().sendToQueue();
|
||||||
}
|
}
|
||||||
|
|
||||||
private Leg handleLegChangeEvent(Leg leg, LegData legData) {
|
private Leg handleLegChangeEvent(Leg leg, LegData legData) {
|
||||||
|
|
|
@ -166,7 +166,7 @@ public class CTripUtils {
|
||||||
case "Submitted" -> OrderConstant.ORDER_EVENT_PREPARE; // "已提交"映射到准备状态
|
case "Submitted" -> OrderConstant.ORDER_EVENT_PREPARE; // "已提交"映射到准备状态
|
||||||
case "Confirmed" -> OrderConstant.ORDER_EVENT_ORDERED; // "已客户确认"映射到已下单
|
case "Confirmed" -> OrderConstant.ORDER_EVENT_ORDERED; // "已客户确认"映射到已下单
|
||||||
case "Cancelled" -> OrderConstant.ORDER_EVENT_REFUND; // "已取消"映射到取消
|
case "Cancelled" -> OrderConstant.ORDER_EVENT_REFUND; // "已取消"映射到取消
|
||||||
case "Refunded" -> OrderConstant.ORDER_EVENT_REFUND; // "已取消"映射到取消
|
case "Refunded" -> OrderConstant.ORDER_EVENT_REFUND; // "已退款"映射到取消
|
||||||
case "Wait" ->
|
case "Wait" ->
|
||||||
// "确认中"可能表示订单正在处理中,但没有直接映射,可能需要新的状态常量
|
// "确认中"可能表示订单正在处理中,但没有直接映射,可能需要新的状态常量
|
||||||
OrderConstant.ORDER_EVENT_ORDERED;
|
OrderConstant.ORDER_EVENT_ORDERED;
|
||||||
|
|
Loading…
Reference in New Issue