From 641c32fbfb4dc5fe87445d296a290d66e5733e5e Mon Sep 17 00:00:00 2001 From: huangqizhen <15552608129@163.com> Date: Wed, 19 Nov 2025 19:12:02 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=B8=81=E7=A7=8D=E4=B8=8E?= =?UTF-8?q?=E6=95=B0=E9=87=8F=E6=9C=AA=E9=99=A4100=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/example/demo/serviceImpl/cash/CashRefundServiceImpl.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/example/demo/serviceImpl/cash/CashRefundServiceImpl.java b/src/main/java/com/example/demo/serviceImpl/cash/CashRefundServiceImpl.java index 506096b..660229e 100644 --- a/src/main/java/com/example/demo/serviceImpl/cash/CashRefundServiceImpl.java +++ b/src/main/java/com/example/demo/serviceImpl/cash/CashRefundServiceImpl.java @@ -140,9 +140,13 @@ public class CashRefundServiceImpl implements RefundService { item.setFree(free); item.setActivity(cashCollection.getActivity()); item.setPaymentCurrency(cashCollection.getPaymentCurrency()); - item.setPaymentAmount(cashCollection.getPaymentAmount().divide(new BigDecimal(100), 2, RoundingMode.HALF_UP)); + if(cashCollection.getPaymentCurrency() != null){ + item.setPaymentAmount(cashCollection.getPaymentAmount().divide(new BigDecimal(100), 2, RoundingMode.HALF_UP));} + else item.setPaymentAmount(cashCollection.getPaymentAmount()); item.setReceivedCurrency(cashCollection.getReceivedCurrency()); - item.setReceivedAmount(cashCollection.getReceivedAmount().divide(new BigDecimal(100), 2, RoundingMode.HALF_UP)); + if (cashCollection.getReceivedCurrency() != null){ + item.setReceivedAmount(cashCollection.getReceivedAmount().divide(new BigDecimal(100), 2, RoundingMode.HALF_UP));} + else item.setReceivedAmount(cashCollection.getReceivedAmount()); item.setPayType(cashCollection.getPayType()); item.setPayTime(cashCollection.getPayTime()); item.setPayBankCode(cashCollection.getBankCode());