From 36ab1ae3c26ad84388b1729d2e9249e4d3421aa6 Mon Sep 17 00:00:00 2001 From: wangw <1594593906@qq.com> Date: Sat, 31 Jan 2026 14:52:25 +0800 Subject: [PATCH] =?UTF-8?q?=E5=95=86=E6=88=B7=E4=BD=99=E9=A2=9D=E6=9B=B4?= =?UTF-8?q?=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../czg/service/account/service/impl/ShopInfoServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cash-service/account-service/src/main/java/com/czg/service/account/service/impl/ShopInfoServiceImpl.java b/cash-service/account-service/src/main/java/com/czg/service/account/service/impl/ShopInfoServiceImpl.java index 112d081c6..0e4034cd8 100644 --- a/cash-service/account-service/src/main/java/com/czg/service/account/service/impl/ShopInfoServiceImpl.java +++ b/cash-service/account-service/src/main/java/com/czg/service/account/service/impl/ShopInfoServiceImpl.java @@ -459,7 +459,7 @@ public class ShopInfoServiceImpl extends ServiceImpl i @Override public BigDecimal updateAmount(Long id, BigDecimal amount) { ShopInfo shopInfo = getShopInfo(id); - if (shopInfo.getAmount() == null || shopInfo.getAmount().compareTo(BigDecimal.ZERO) <= 0) { + if (shopInfo.getAmount().add(amount).compareTo(BigDecimal.ZERO) < 0) { throw new CzgException("更新失败"); } boolean flag = mapper.updateAmount(id, amount);