From 018480994e5b940d74e3aa21382908cbd6c58104 Mon Sep 17 00:00:00 2001 From: SongZhang <2064194730@qq.com> Date: Tue, 5 Nov 2024 15:17:14 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E9=9C=B8=E7=8E=8B=E9=A4=90=E5=85=85?= =?UTF-8?q?=E5=80=BC=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chaozhanggui/system/cashierservice/service/PayService.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/service/PayService.java b/src/main/java/com/chaozhanggui/system/cashierservice/service/PayService.java index de45ae3..069540e 100644 --- a/src/main/java/com/chaozhanggui/system/cashierservice/service/PayService.java +++ b/src/main/java/com/chaozhanggui/system/cashierservice/service/PayService.java @@ -460,6 +460,9 @@ public class PayService { } shouldPayAmount = shouldPayAmount.subtract(userCouponVo.getDiscountAmount()); + if (shouldPayAmount.compareTo(BigDecimal.ZERO) < 0) { + shouldPayAmount = new BigDecimal("0.01"); + } TbShopCoupon tbShopCoupons = mpShopCouponMapper.selectById(userCouponVo.getCouponId()); if (tbShopCoupons == null) {