From cbdf804c9ceea3bfb817c98c047521b4d3928d11 Mon Sep 17 00:00:00 2001 From: TS-QD1 Date: Fri, 21 Jun 2024 18:07:33 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=8D=E8=B4=B9=E9=87=91=E9=A2=9D=E5=88=9B?= =?UTF-8?q?=E5=BB=BA=E8=AE=A2=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../operator/pojo/vos/accountitem/AccountItemVO.java | 1 + .../service/accountitem/impl/AccountItemServiceImpl.java | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/java/cn/com/tenlion/operator/pojo/vos/accountitem/AccountItemVO.java b/src/main/java/cn/com/tenlion/operator/pojo/vos/accountitem/AccountItemVO.java index 2d5dc36..fbd393c 100644 --- a/src/main/java/cn/com/tenlion/operator/pojo/vos/accountitem/AccountItemVO.java +++ b/src/main/java/cn/com/tenlion/operator/pojo/vos/accountitem/AccountItemVO.java @@ -43,6 +43,7 @@ public class AccountItemVO { private String checkStatus; private Integer isPostpaid; + public String getOrderType() { return orderType == null ? "" : orderType.trim(); } diff --git a/src/main/java/cn/com/tenlion/operator/service/accountitem/impl/AccountItemServiceImpl.java b/src/main/java/cn/com/tenlion/operator/service/accountitem/impl/AccountItemServiceImpl.java index 7981a3e..272dea8 100644 --- a/src/main/java/cn/com/tenlion/operator/service/accountitem/impl/AccountItemServiceImpl.java +++ b/src/main/java/cn/com/tenlion/operator/service/accountitem/impl/AccountItemServiceImpl.java @@ -101,8 +101,10 @@ public class AccountItemServiceImpl extends DefaultBaseService implements IAccou new1 = old1 + accountItemVO.getAccountMoney(); } else { new1 = old1 - accountItemVO.getAccountMoney(); - if (accountItemVO.getIsPostpaid() == 0 && new1 < 0) { - throw new SaveException("余额不足抵扣"); + if(accountItemVO.getAccountMoney() != 0) { + if (accountItemVO.getIsPostpaid() == 0 && new1 < 0) { + throw new SaveException("余额不足抵扣"); + } } } accountItemVO.setAccountBeforeMoney(old1);