This commit is contained in:
2023-06-13 13:25:35 +08:00
parent 6d2af9dbec
commit ac3e4b43eb

View File

@@ -877,8 +877,8 @@ public class OrderService {
// 支付流水 // 支付流水
List<OrderPayRecord> orderPayRecordList = orderPayRecordService.getOrderPayRecordList(orderCode); List<OrderPayRecord> orderPayRecordList = orderPayRecordService.getOrderPayRecordList(orderCode);
if (CollectionUtils.isNotEmpty(orderPayRecordList)) { if (CollectionUtils.isNotEmpty(orderPayRecordList)) {
OrderPayRecord orderPayRecord = orderPayRecordList.get(0);
List<OrderDetailInfoVO.PayRecord> payRecordList = Lists.newArrayList(); List<OrderDetailInfoVO.PayRecord> payRecordList = Lists.newArrayList();
for (OrderPayRecord orderPayRecord : orderPayRecordList) {
OrderDetailInfoVO.PayRecord payInfo = new OrderDetailInfoVO.PayRecord(); OrderDetailInfoVO.PayRecord payInfo = new OrderDetailInfoVO.PayRecord();
// 余额支付如果是由本金和赠送一起支付的,合并为一个 // 余额支付如果是由本金和赠送一起支付的,合并为一个
BigDecimal bigDecimal = orderPayRecordList.stream() BigDecimal bigDecimal = orderPayRecordList.stream()
@@ -887,7 +887,9 @@ public class OrderService {
payInfo.setPayAmount(bigDecimal.toString()); payInfo.setPayAmount(bigDecimal.toString());
payInfo.setPayStatus(orderBasicInfo.getPayStatus()); payInfo.setPayStatus(orderBasicInfo.getPayStatus());
payInfo.setPayTime(DateUtils.formatDateTime(orderBasicInfo.getPayTime())); payInfo.setPayTime(DateUtils.formatDateTime(orderBasicInfo.getPayTime()));
if (orderPayRecord.getRefundAmount() != null) {
payInfo.setRefundAmount(orderPayRecord.getRefundAmount().toString()); payInfo.setRefundAmount(orderPayRecord.getRefundAmount().toString());
}
String payMode = orderPayRecord.getPayMode(); String payMode = orderPayRecord.getPayMode();
if (StringUtils.equals(payMode, OrderPayRecordEnum.PRINCIPAL_BALANCE_PAYMENT.getValue()) if (StringUtils.equals(payMode, OrderPayRecordEnum.PRINCIPAL_BALANCE_PAYMENT.getValue())
|| StringUtils.equals(payMode, OrderPayRecordEnum.GIFT_BALANCE_PAYMENT.getValue())) { || StringUtils.equals(payMode, OrderPayRecordEnum.GIFT_BALANCE_PAYMENT.getValue())) {
@@ -910,6 +912,7 @@ public class OrderService {
payInfo.setPayModeDesc(OrderPayModeEnum.PAYMENT_OF_WHITELIST.getLabel()); payInfo.setPayModeDesc(OrderPayModeEnum.PAYMENT_OF_WHITELIST.getLabel());
} }
payRecordList.add(payInfo); payRecordList.add(payInfo);
}
vo.setPayRecordList(payRecordList); vo.setPayRecordList(payRecordList);
} }