From 16fa707f320ee40de41ae54f62b86c5dafb52593 Mon Sep 17 00:00:00 2001 From: "autumn.g@foxmail.com" Date: Thu, 31 Aug 2023 16:06:49 +0800 Subject: [PATCH] update --- .../impl/OrderPayRecordServiceImpl.java | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/OrderPayRecordServiceImpl.java b/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/OrderPayRecordServiceImpl.java index e7a8fd0c2..4f9b804d6 100644 --- a/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/OrderPayRecordServiceImpl.java +++ b/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/OrderPayRecordServiceImpl.java @@ -18,7 +18,6 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import javax.annotation.Resource; -import java.math.BigDecimal; import java.util.List; @Service @@ -88,16 +87,19 @@ public class OrderPayRecordServiceImpl implements OrderPayRecordService { List payRecordList = Lists.newArrayList(); for (OrderPayRecord orderPayRecord : orderPayRecordList) { OrderDetailInfoVO.PayRecord payInfo = new OrderDetailInfoVO.PayRecord(); + // 余额支付如果是由本金和赠送一起支付的,合并为一个 - BigDecimal bigDecimal = orderPayRecordList.stream() - .map(OrderPayRecord::getPayAmount) - .reduce(BigDecimal.ZERO, BigDecimal::add); - payInfo.setPayAmount(bigDecimal.toString()); + // BigDecimal bigDecimal = orderPayRecordList.stream() + // .map(OrderPayRecord::getPayAmount) + // .reduce(BigDecimal.ZERO, BigDecimal::add); + // payInfo.setPayAmount(bigDecimal.toString()); + payInfo.setPayAmount(orderPayRecord.getPayAmount().toString()); payInfo.setPayStatus(orderBasicInfo.getPayStatus()); payInfo.setPayTime(DateUtils.formatDateTime(orderBasicInfo.getPayTime())); - if (orderBasicInfo.getRefundAmount() != null) { - payInfo.setRefundAmount(orderBasicInfo.getRefundAmount().toString()); - } + // if (orderBasicInfo.getRefundAmount() != null) { + // payInfo.setRefundAmount(orderBasicInfo.getRefundAmount().toString()); + // } + String payMode = orderPayRecord.getPayMode(); if (StringUtils.equals(payMode, OrderPayRecordEnum.PRINCIPAL_BALANCE_PAYMENT.getValue()) || StringUtils.equals(payMode, OrderPayRecordEnum.GIFT_BALANCE_PAYMENT.getValue())) {