From 972ab851c8929f1399be381e67e9859599685971 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=89=9B=E5=8F=89=E9=97=AA=E9=97=AA?= <18322780655@163.com> Date: Tue, 20 Aug 2024 15:30:21 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=A2=9E=E5=8A=A0=E5=87=8F?= =?UTF-8?q?=E5=B0=91=E7=94=A8=E6=88=B7=E8=B5=84=E9=87=91=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/shopimpl/TbShopUserServiceImpl.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/eladmin-system/src/main/java/cn/ysk/cashier/service/impl/shopimpl/TbShopUserServiceImpl.java b/eladmin-system/src/main/java/cn/ysk/cashier/service/impl/shopimpl/TbShopUserServiceImpl.java index e397431e..f33a6e4b 100644 --- a/eladmin-system/src/main/java/cn/ysk/cashier/service/impl/shopimpl/TbShopUserServiceImpl.java +++ b/eladmin-system/src/main/java/cn/ysk/cashier/service/impl/shopimpl/TbShopUserServiceImpl.java @@ -214,13 +214,17 @@ public class TbShopUserServiceImpl implements TbShopUserService { if(ObjectUtil.isNull(tbShopUser)){ throw new BadRequestException("不存在的会员信息"); } + String operationType=map.get("operationType").toString(); BigDecimal amount=new BigDecimal(map.get("amount").toString()); - if(amount.compareTo(tbShopUser.getAmount())>0){ - throw new BadRequestException("账户余额不足,请输入正确的金额"); + if("out".equals(operationType)){ + if(amount.compareTo(tbShopUser.getAmount())>0){ + throw new BadRequestException("账户余额不足,请输入正确的金额"); + } } - String operationType=map.get("operationType").toString(); + + String type=map.get("type").toString(); TbShopUserFlow flow=new TbShopUserFlow();