|
|
@@ -299,12 +299,15 @@ public class FsStorePaymentScrmServiceImpl implements IFsStorePaymentScrmService
|
|
|
|
|
|
@Override
|
|
|
public Map<String, BigDecimal> calculateTotalAmount(FsStorePaymentParam fsStorePayment) {
|
|
|
- FsStorePaymentAmountVO fsStorePaymentAmountVO =fsStorePaymentMapper.calculateTotalAmount(fsStorePayment);
|
|
|
- BigDecimal totalPaymentAmount = fsStorePaymentAmountVO.getTotalPaymentAmount() == null
|
|
|
- ? BigDecimal.ZERO : fsStorePaymentAmountVO.getTotalPaymentAmount();
|
|
|
- BigDecimal totalRefundAmount = fsStorePaymentAmountVO.getTotalRefundAmount() == null
|
|
|
- ? BigDecimal.ZERO : fsStorePaymentAmountVO.getTotalRefundAmount();
|
|
|
-
|
|
|
+ FsStorePaymentAmountVO fsStorePaymentAmountVO = fsStorePaymentMapper.calculateTotalAmount(fsStorePayment);
|
|
|
+ BigDecimal totalPaymentAmount = BigDecimal.ZERO;
|
|
|
+ BigDecimal totalRefundAmount = BigDecimal.ZERO;
|
|
|
+ if (StringUtils.isNotNull(fsStorePaymentAmountVO)) {
|
|
|
+ totalPaymentAmount = fsStorePaymentAmountVO.getTotalPaymentAmount() == null
|
|
|
+ ? BigDecimal.ZERO : fsStorePaymentAmountVO.getTotalPaymentAmount();
|
|
|
+ totalRefundAmount = fsStorePaymentAmountVO.getTotalRefundAmount() == null
|
|
|
+ ? BigDecimal.ZERO : fsStorePaymentAmountVO.getTotalRefundAmount();
|
|
|
+ }
|
|
|
Map<String, BigDecimal> resultMap = new HashMap<>();
|
|
|
resultMap.put("totalPaymentAmount", totalPaymentAmount);
|
|
|
resultMap.put("totalRefundAmount", totalRefundAmount);
|