From 99e433c3a57b9ecf9a831445715a393cc130ef89 Mon Sep 17 00:00:00 2001 From: "15989082884@163.com" <15989082884@163.com> Date: Mon, 9 Oct 2023 15:52:02 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E4=BB=98=E6=8E=A5=E5=8F=A3=E5=BE=AE?= =?UTF-8?q?=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../serve/modules/pay/entity/bo/PayPaymentBo.java | 4 ++-- .../pay/service/impl/PayPaymentServiceImpl.java | 14 +++++++++++--- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/qs/serve/modules/pay/entity/bo/PayPaymentBo.java b/src/main/java/com/qs/serve/modules/pay/entity/bo/PayPaymentBo.java index 5fa7db42..89070136 100644 --- a/src/main/java/com/qs/serve/modules/pay/entity/bo/PayPaymentBo.java +++ b/src/main/java/com/qs/serve/modules/pay/entity/bo/PayPaymentBo.java @@ -31,8 +31,8 @@ public class PayPaymentBo implements Serializable { private String verificationSubCode; /** 支付金额 */ - @DecimalMin(value = "0.01",message = "支付金额必须大于0元") - @NotNull(message = "支付金额不能为空") +// @DecimalMin(value = "0.01",message = "支付金额必须大于0元") +// @NotNull(message = "支付金额不能为空") private BigDecimal payAmount; /** ERP编码 */ diff --git a/src/main/java/com/qs/serve/modules/pay/service/impl/PayPaymentServiceImpl.java b/src/main/java/com/qs/serve/modules/pay/service/impl/PayPaymentServiceImpl.java index 4ebaba58..19cdc7ac 100644 --- a/src/main/java/com/qs/serve/modules/pay/service/impl/PayPaymentServiceImpl.java +++ b/src/main/java/com/qs/serve/modules/pay/service/impl/PayPaymentServiceImpl.java @@ -106,6 +106,10 @@ public class PayPaymentServiceImpl extends ServiceImpl0){ Assert.throwEx("支付金额已超出可支付额"); } @@ -218,11 +222,15 @@ public class PayPaymentServiceImpl extends ServiceImpl0){ - Assert.throwEx("支付金额已超出可支付额"); + if(1 != paymentBo.getRelease()) { + if(paymentBo.getPayAmount()==null){ + Assert.throwEx("支付金额不能为空!"); + } + if (paymentBo.getPayAmount().compareTo(notPayAmount) > 0) { + Assert.throwEx("支付金额已超出可支付额"); + } } - PayPayment payPayment = new PayPayment(); payPayment.setPayType("unPay"); payPayment.setPayCode(paymentBo.getErpId());