修复携程酒店订单价格取值问题

This commit is contained in:
lulz1 2024-05-14 16:24:22 +08:00
parent d88eced6a8
commit f645cebd44
3 changed files with 20 additions and 20 deletions

View File

@ -485,7 +485,7 @@ public class CTripOrderExtensionFactoryImpl implements OrderExtensionFactory {
hotelOrderDetail.setRoomCount(hotelOrderInfoEntity.getRoomQuantity()); //退订夜间数
hotelOrderDetail.setRoomTypeName(hotelOrderInfoEntity.getRoomName()); //房型
if (Double.parseDouble(hotelOrderInfoEntity.getAmount()) > 0) {
HotelOrderInfoEntity.PaymentInfoEntity paymentInfo = hotelOrderInfoEntity.getPaymentInfo();
if (paymentInfo != null && paymentInfo.getPaymentItemList() != null && !paymentInfo.getPaymentItemList().isEmpty()) {
List<HotelOrderInfoEntity.PaymentItem> paymentItemList = paymentInfo.getPaymentItemList();
@ -496,11 +496,11 @@ public class CTripOrderExtensionFactoryImpl implements OrderExtensionFactory {
hotelOrderDetail.setOrderAmount(BigDecimalCalculator.add(hotelOrderDetail.getOrderAmount(),
String.valueOf(paymentItem.getAmount())));
}
}
} else {
hotelOrderDetail.setOrderAmount(KEEP_TWO_DECIMAL_ZERO);
}
hotelOrderDetail.setPreServiceFee(hotelOrderInfoEntity.getFrontendServiceFee());
hotelOrderDetail.setPostServiceFee(hotelOrderInfoEntity.getAfterServiceFee());
hotelOrderDetail.setStandardItems(hotelOrderInfoEntity.getTPMaxPrice());

View File

@ -92,17 +92,17 @@ public class HotelOrderInfoEntity {
@Data
public static class PaymentInfoEntity {
private List<PaymentItem> paymentItemList;
private Double originalTotalAmountExclude;
private List<PaymentItem> PaymentItemList;
private Double OriginalTotalAmountExclude;
}
@Data
public static class PaymentItem {
private String prePayType;
private String paymentStatus;
private String currency;
private Double exchange;
private Double amount;
private String PrePayType;
private String PaymentStatus;
private String Currency;
private Double Exchange;
private Double Amount;
}
}

View File

@ -350,9 +350,9 @@ class RouteApplicationTests {
routeRepository.deleteById(875L);
}
// @Test
@Test
void deleteOrderDetail() {
orderDetailRepository.deleteById(2609L);
orderDetailRepository.deleteById(3050L);
}
// @Test