Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
b85060b299
|
@ -30,6 +30,8 @@ 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;
|
||||
import com.chint.interfaces.rest.ctrip.dto.search.hotel.HotelOrderInfoEntity;
|
||||
import com.chint.interfaces.rest.ctrip.dto.search.hotel.RefundInfo;
|
||||
import com.chint.interfaces.rest.ly.LYSearchRequest;
|
||||
import com.chint.interfaces.rest.ly.dto.search.response.filght.FlightOrderResponse;
|
||||
import com.chint.interfaces.rest.ly.dto.search.response.train.TrainDetailResponse;
|
||||
|
@ -217,6 +219,9 @@ public class OrderDomainService {
|
|||
generateRefundAndChangeOrder(orderDetail.getOrderNo());
|
||||
}
|
||||
|
||||
if (!orderEventType.equals(ORDER_EVENT_ETA) && orderDetail.getProductType().equals(LEG_TYPE_HOTEL)) {
|
||||
generateHotelRefundAndChangeOrder(orderDetail.getOrderNo());
|
||||
}
|
||||
if (!orderEventType.equals(ORDER_EVENT_ETA) && orderDetail.getProductType().equals(LEG_TYPE_TAXI)) {
|
||||
carRefundChangeOrder(orderDetail.getOrderNo());
|
||||
}
|
||||
|
@ -437,6 +442,25 @@ public class OrderDomainService {
|
|||
}
|
||||
}
|
||||
|
||||
private void generateHotelRefundAndChangeOrder(String orderNo) {
|
||||
SearchOrderResponse response = cTripOrderSearchRequest.searchOrderResponseByOrderId(orderNo);
|
||||
HotelOrderInfoEntity flightOrderInfoEntity = response.getItineraryList().get(0).getHotelOrderInfoList().get(0);
|
||||
|
||||
|
||||
List<RefundInfo> refundInfo = flightOrderInfoEntity.getRefundInfo();
|
||||
if (refundInfo != null && !refundInfo.isEmpty()) {
|
||||
for (RefundInfo flightRefundInfo : refundInfo) {
|
||||
if (flightOrderInfoEntity.getOrderDetailStatus().equals("Cancelled")) {
|
||||
Command.of(CTripOrderRefundCommand.class).Info(String.valueOf(flightRefundInfo.getRefundInfoID()),
|
||||
flightOrderInfoEntity.getOrderID(),
|
||||
"-" + flightRefundInfo.getRefundCustomerAmount(),
|
||||
"4",
|
||||
flightOrderInfoEntity.getCancelTime()).sendToQueue();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void carRefundChangeOrder(String orderNo) {
|
||||
SearchOrderResponse searchOrderResponse = cTripOrderSearchRequest.searchOrderResponseByOrderId(orderNo);
|
||||
|
|
|
@ -77,4 +77,6 @@ public class HotelOrderInfoEntity {
|
|||
// 后续字段含义类似,可根据实际情况添加注释
|
||||
|
||||
private List<ClientInfo> ClientInfo; // 客户信息列表
|
||||
|
||||
private List<RefundInfo> RefundInfo; // 客户信息列表
|
||||
}
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
package com.chint.interfaces.rest.ctrip.dto.search.hotel;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class RefundInfo {
|
||||
private long RefundInfoID;
|
||||
private int RefundCustomerAmount;
|
||||
private String Currency;
|
||||
private int ExchangeRate;
|
||||
// private List<RefundPayment> RefundPaymentList;
|
||||
// private List<RefundDetail> RefundDetailList;
|
||||
private Long ModifyFormId;
|
||||
}
|
|
@ -201,7 +201,7 @@ public class CTripTest {
|
|||
System.out.println(gson.toJson(estimate));
|
||||
}
|
||||
|
||||
@Test
|
||||
// @Test
|
||||
void search() {
|
||||
BaseContext.setCurrentUser(user);
|
||||
SearchOrderResponse response = orderSearchRequest.searchOrderResponseByOrderId("29882203254");
|
||||
|
|
Loading…
Reference in New Issue