mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 02:55:04 +08:00
update
This commit is contained in:
@@ -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<OrderDetailInfoVO.PayRecord> 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())) {
|
||||
|
||||
Reference in New Issue
Block a user