免费金额创建订单

This commit is contained in:
TS-QD1 2024-06-21 18:07:33 +08:00
parent b37be9472f
commit cbdf804c9c
2 changed files with 5 additions and 2 deletions

View File

@ -43,6 +43,7 @@ public class AccountItemVO {
private String checkStatus; private String checkStatus;
private Integer isPostpaid; private Integer isPostpaid;
public String getOrderType() { public String getOrderType() {
return orderType == null ? "" : orderType.trim(); return orderType == null ? "" : orderType.trim();
} }

View File

@ -101,10 +101,12 @@ public class AccountItemServiceImpl extends DefaultBaseService implements IAccou
new1 = old1 + accountItemVO.getAccountMoney(); new1 = old1 + accountItemVO.getAccountMoney();
} else { } else {
new1 = old1 - accountItemVO.getAccountMoney(); new1 = old1 - accountItemVO.getAccountMoney();
if(accountItemVO.getAccountMoney() != 0) {
if (accountItemVO.getIsPostpaid() == 0 && new1 < 0) { if (accountItemVO.getIsPostpaid() == 0 && new1 < 0) {
throw new SaveException("余额不足抵扣"); throw new SaveException("余额不足抵扣");
} }
} }
}
accountItemVO.setAccountBeforeMoney(old1); accountItemVO.setAccountBeforeMoney(old1);
accountItemVO.setAccountAfterMoney(new1); accountItemVO.setAccountAfterMoney(new1);
/** /**