From a99c7ec2f0aeac689f47f92ffe70415a86919ce8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?LI-CCONG=5C=E6=9D=8E=E8=81=AA=E8=81=AA?= <1441652193@qq.com> Date: Fri, 15 Mar 2024 14:32:42 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=81=E4=B8=9A=E5=95=86=E6=88=B7=E4=BA=A4?= =?UTF-8?q?=E6=98=93=E6=B5=81=E6=B0=B4=E8=AE=B0=E5=BD=95=E5=8A=9F=E8=83=BD?= =?UTF-8?q?v2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cc/yunxi/service/impl/ClientServiceImpl.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/nxhs-service/src/main/java/cc/yunxi/service/impl/ClientServiceImpl.java b/nxhs-service/src/main/java/cc/yunxi/service/impl/ClientServiceImpl.java index 9a75141..0af975e 100644 --- a/nxhs-service/src/main/java/cc/yunxi/service/impl/ClientServiceImpl.java +++ b/nxhs-service/src/main/java/cc/yunxi/service/impl/ClientServiceImpl.java @@ -250,12 +250,6 @@ public class ClientServiceImpl extends ServiceImpl impleme if (changeTypeEnum.equals(BalanceChangeTypeEnum.INCOME)) { // 收入 balance = balance.add(amount); remark = "废品回收结算,收入" + amount + "元"; - } else { // 微信提现 - if (balance.compareTo(amount) < 0) { - throw new BizIllegalException("余额不足"); - } - balance = balance.subtract(amount); - remark = "微信提现" + amount + "元"; // 更新商户资金 Enterprise enterprise = enterpriseService.getEnterpriseByStationId(stationId); @@ -277,6 +271,13 @@ public class ClientServiceImpl extends ServiceImpl impleme accountBill.setRemark("支付给散户"+ amount + "元"); accountBill.setCreatorTime(now); accountBillMapper.insert(accountBill); + + } else { // 微信提现 + if (balance.compareTo(amount) < 0) { + throw new BizIllegalException("余额不足"); + } + balance = balance.subtract(amount); + remark = "微信提现" + amount + "元"; } // 更新散户余额 client.setBanlance(balance);