From 21bc6f1f4c37d69472abf69b6dbb665e6c54e69c Mon Sep 17 00:00:00 2001 From: lijianlin Date: Fri, 23 Jan 2026 17:41:30 +0800 Subject: [PATCH] =?UTF-8?q?01-23=20=E7=BC=96=E8=BE=91=E6=89=8B=E7=BB=AD?= =?UTF-8?q?=E8=B4=B9=20Strip=EF=BC=8CPaypal=E6=A0=A1=E9=AA=8C=E6=94=AF?= =?UTF-8?q?=E4=BB=98=E4=B8=8E=E6=94=B6=E6=AC=BE=E5=B8=81=E7=A7=8D=E4=B8=80?= =?UTF-8?q?=E8=87=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../example/demo/serviceImpl/cash/CashCollectionServiceImpl.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/java/com/example/demo/serviceImpl/cash/CashCollectionServiceImpl.java b/src/main/java/com/example/demo/serviceImpl/cash/CashCollectionServiceImpl.java index adec204..9d5546c 100644 --- a/src/main/java/com/example/demo/serviceImpl/cash/CashCollectionServiceImpl.java +++ b/src/main/java/com/example/demo/serviceImpl/cash/CashCollectionServiceImpl.java @@ -33,6 +33,7 @@ import java.time.LocalDateTime; import java.time.ZoneOffset; import java.util.Arrays; import java.util.List; +import java.util.Objects; import java.util.UUID; import java.util.stream.Collectors; @@ -350,6 +351,11 @@ public class CashCollectionServiceImpl implements CashCollectionService { public String complete(CashRecord cashRecord) { + if (!Objects.equals(cashRecord.getPaymentCurrency(), cashRecord.getReceivedCurrency()) + && ("Stripe".equals(cashRecord.getPayType()) || "Paypal".equals(cashRecord.getPayType()))) { + return "支付币种与收款币种不一致"; + } + int rows = cashCollectionMapper.complete(cashRecord); return rows > 0 ? "编辑成功" : "编辑失败";