携程机票改签信息,增加对多条改签信息得判断

This commit is contained in:
lulz1 2024-03-19 18:17:16 +08:00
parent db7fc1df50
commit 78ef3309e2
1 changed files with 8 additions and 2 deletions

View File

@ -226,7 +226,7 @@ public class CTripOrderExtensionFactoryImpl implements OrderExtensionFactory {
flightOrderDetail.setOrderAmount(String.valueOf(flightOrderBasicInfo.getAmount()));
//只有下单成功得状态会收取服务费
if (flightOrderDetail.equals(FSSC_FLIGHT_STATUS_SUCCESS)) {
if (flightOrderDetail.getOrderStatus().equals(FSSC_FLIGHT_STATUS_SUCCESS)) {
flightOrderDetail.setPostServiceFee(String.valueOf(flightOrderBasicInfo.getPostBasicServiceFee()));
} else {
flightOrderDetail.setPostServiceFee(KEEP_TWO_DECIMAL_ZERO);
@ -308,7 +308,13 @@ public class CTripOrderExtensionFactoryImpl implements OrderExtensionFactory {
SequenceInfo sequenceInfo = sequenceInfoList.get(0);
if (sequenceInfo.getChangeInfo() != null && !sequenceInfo.getChangeInfo().isEmpty() &&
flightOrderDetail.getOrderStatus().equals(FSSC_FLIGHT_STATUS_CHANGE)) {
ChangeInfo changeInfo = sequenceInfo.getChangeInfo().get(0);
String[] split = flightOrderDetail.getDetailId().split("-");
//要找出对应退票信息
ChangeInfo changeInfo = sequenceInfo
.getChangeInfo()
.stream()
.filter(it -> it.getRebookId().equals(Integer.parseInt(split[1])))
.toList().get(0);
flightOrderDetail.setUpFee(String.valueOf(changeInfo.getPriceDifferential()));
//如果是改签的要加入改签费
flightOrderDetail.setChangeFee(String.valueOf(changeInfo.getRebookServiceFee()));