同步机票退款代码

This commit is contained in:
lulz1 2024-03-14 22:51:51 +08:00
parent 46189c0d5f
commit 9ea992c5b6
2 changed files with 22 additions and 13 deletions

View File

@ -30,6 +30,7 @@ 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.flight.PassengerInfo;
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;
@ -417,6 +418,9 @@ public class OrderDomainService {
SearchOrderResponse response = cTripOrderSearchRequest.searchOrderResponseByOrderId(orderNo);
FlightOrderInfoEntity flightOrderInfoEntity = response.getItineraryList().get(0).getFlightOrderInfoList().get(0);
List<FlightRefundInfo> refundInfo = flightOrderInfoEntity.getRefundInfo();
if (refundInfo == null) {
return;
}
if (refundInfo != null && !refundInfo.isEmpty()) {
for (FlightRefundInfo flightRefundInfo : refundInfo) {
if (flightRefundInfo.getRefundStatus().equals("D")) {
@ -428,7 +432,14 @@ public class OrderDomainService {
}
}
}
List<ChangeInfo> changeInfo = flightOrderInfoEntity.getPassengerInfo().get(0).getSequenceInfo().get(0).getChangeInfo();
List<PassengerInfo> passengerInfo = flightOrderInfoEntity.getPassengerInfo();
if (passengerInfo == null) {
return;
}
if (passengerInfo.get(0).getSequenceInfo() == null) {
return;
}
List<ChangeInfo> changeInfo = passengerInfo.get(0).getSequenceInfo().get(0).getChangeInfo();
if (changeInfo != null && !changeInfo.isEmpty()) {
for (ChangeInfo info : changeInfo) {
if (info.getCStatus().equals("改签成功")) {
@ -447,8 +458,6 @@ 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) {

View File

@ -4,19 +4,19 @@ server:
chint:
loginSecretKey: ZhengTaiRoute
datasource:
# driver-class-name: com.mysql.cj.jdbc.Driver
# host: 10.10.68.67
# port: 6603
# database: itinerary_booking
# username: tripbookpro
# password: W@Xbf25d&lG5k*L01X#
driver-class-name: com.mysql.cj.jdbc.Driver
host: 10.10.24.44
# host: 10.9.56.48
host: 10.10.68.67
port: 6603
database: itinerary_booking
username: tripbook
password: W@Xgf25d&lRk*L0X#
username: tripbookpro
password: W@Xbf25d&lG5k*L01X#
# driver-class-name: com.mysql.cj.jdbc.Driver
# host: 10.10.24.44
# # host: 10.9.56.48
# port: 6603
# database: itinerary_booking
# username: tripbook
# password: W@Xgf25d&lRk*L0X#
url: https://trip.chint.com/
redis:
host: 10.10.68.66