携程打车明细调整
This commit is contained in:
parent
9accec66ba
commit
26064389f1
|
@ -24,6 +24,9 @@ import com.chint.interfaces.rest.bpm.dto.RescheduleDto;
|
|||
import com.chint.interfaces.rest.ctrip.CTripOrderSearchRequest;
|
||||
import com.chint.interfaces.rest.ctrip.dto.search.ItineraryEntity;
|
||||
import com.chint.interfaces.rest.ctrip.dto.search.SearchOrderResponse;
|
||||
import com.chint.interfaces.rest.ctrip.dto.search.car.CarBasicInfo;
|
||||
import com.chint.interfaces.rest.ctrip.dto.search.car.CarQuickOrderInfoEntity;
|
||||
import com.chint.interfaces.rest.ctrip.dto.search.car.OrderFee;
|
||||
import com.chint.interfaces.rest.ctrip.dto.search.flight.ChangeInfo;
|
||||
import com.chint.interfaces.rest.ctrip.dto.search.flight.FlightOrderInfoEntity;
|
||||
import com.chint.interfaces.rest.ctrip.dto.search.flight.FlightRefundInfo;
|
||||
|
@ -214,7 +217,9 @@ public class OrderDomainService {
|
|||
generateRefundAndChangeOrder(orderDetail.getOrderNo());
|
||||
}
|
||||
|
||||
|
||||
if (!orderEventType.equals(ORDER_EVENT_ETA) && orderDetail.getProductType().equals(LEG_TYPE_TAXI)) {
|
||||
carRefundChangeOrder(orderDetail.getOrderNo());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -431,4 +436,27 @@ public class OrderDomainService {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void carRefundChangeOrder(String orderNo) {
|
||||
SearchOrderResponse searchOrderResponse = cTripOrderSearchRequest.searchOrderResponseByOrderId(orderNo);
|
||||
List<ItineraryEntity> itineraryList = searchOrderResponse.getItineraryList();
|
||||
List<CarQuickOrderInfoEntity> carQuickOrderInfoList = itineraryList.get(0).getCarQuickOrderInfoList();
|
||||
CarBasicInfo basicInfo = carQuickOrderInfoList.get(0).getBasicInfo();
|
||||
List<OrderFee> orderFeeList = carQuickOrderInfoList.get(0).getOrderFeeList();
|
||||
for (OrderFee orderFee : orderFeeList) {
|
||||
//退款
|
||||
if ("REFUND".equals(orderFee.getCostScene()) || "AFTER_REFUND".equals(orderFee.getCostScene())) {
|
||||
LocalDateTime localDateTime = LocalDateTime.now();
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
||||
Command.of(CTripOrderRefundCommand.class).Info(
|
||||
String.valueOf(orderFee.getOrderFeeId()),
|
||||
basicInfo.getOrderId(),
|
||||
"-" + orderFee.getAmount(),
|
||||
"4",
|
||||
localDateTime.format(formatter)
|
||||
).sendToQueue();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue