From 79e8abf8fb0e451fe151af6350d655f9c92727fd Mon Sep 17 00:00:00 2001 From: puzhibing <393733352@qq.com> Date: 星期五, 09 六月 2023 21:04:21 +0800 Subject: [PATCH] 更新最终版本 --- driver/guns-admin/src/main/java/com/supersavedriving/driver/modular/system/service/impl/AccountChangeDetailServiceImpl.java | 22 ++++------------------ 1 files changed, 4 insertions(+), 18 deletions(-) diff --git a/driver/guns-admin/src/main/java/com/supersavedriving/driver/modular/system/service/impl/AccountChangeDetailServiceImpl.java b/driver/guns-admin/src/main/java/com/supersavedriving/driver/modular/system/service/impl/AccountChangeDetailServiceImpl.java index c6679c0..e2ec610 100644 --- a/driver/guns-admin/src/main/java/com/supersavedriving/driver/modular/system/service/impl/AccountChangeDetailServiceImpl.java +++ b/driver/guns-admin/src/main/java/com/supersavedriving/driver/modular/system/service/impl/AccountChangeDetailServiceImpl.java @@ -134,17 +134,6 @@ double d = num1.doubleValue(); if(backgroundBalance > 0 && backgroundBalance < d){ - AccountChangeDetail accountChangeDetail = new AccountChangeDetail(); - accountChangeDetail.setCode(System.currentTimeMillis() + UUIDUtil.getNumberRandom(3)); - accountChangeDetail.setUserType(2); - accountChangeDetail.setUserId(driver.getId()); - accountChangeDetail.setType(1); - accountChangeDetail.setChangeType(8); - accountChangeDetail.setOldData(driver.getBackgroundBalance()); - accountChangeDetail.setNewData(0D); - accountChangeDetail.setExplain("收取保险费"); - accountChangeDetail.setCreateTime(new Date()); - this.insert(accountChangeDetail); d -= backgroundBalance; driver.setBackgroundBalance(0D); } @@ -155,18 +144,15 @@ accountChangeDetail.setUserId(driver.getId()); accountChangeDetail.setType(1); accountChangeDetail.setChangeType(8); - accountChangeDetail.setOldData(driver.getBalance() + driver.getBackgroundBalance() + driver.getCouponBalance() + driver.getCommission()); + accountChangeDetail.setOldData(driver.getBalance() + driver.getBackgroundBalance()); driver.setBackgroundBalance(driver.getBackgroundBalance() - d); - accountChangeDetail.setNewData(driver.getBalance() + driver.getBackgroundBalance() + driver.getCouponBalance() + driver.getCommission()); + accountChangeDetail.setNewData(driver.getBalance() + driver.getBackgroundBalance()); accountChangeDetail.setExplain("收取保险费"); accountChangeDetail.setCreateTime(new Date()); this.insert(accountChangeDetail); d = 0; } if(d > 0){ - if(balance > 0 && balance < d){ - continue; - } if(balance > 0 && balance >= d){ AccountChangeDetail accountChangeDetail = new AccountChangeDetail(); accountChangeDetail.setCode(System.currentTimeMillis() + UUIDUtil.getNumberRandom(3)); @@ -174,9 +160,9 @@ accountChangeDetail.setUserId(driver.getId()); accountChangeDetail.setType(1); accountChangeDetail.setChangeType(8); - accountChangeDetail.setOldData(driver.getBalance() + driver.getBackgroundBalance() + driver.getCouponBalance() + driver.getCommission()); + accountChangeDetail.setOldData(all); driver.setBalance(driver.getBalance() - d); - accountChangeDetail.setNewData(driver.getBalance() + driver.getBackgroundBalance() + driver.getCouponBalance() + driver.getCommission()); + accountChangeDetail.setNewData(driver.getBalance() + driver.getBackgroundBalance()); accountChangeDetail.setExplain("收取保险费"); accountChangeDetail.setCreateTime(new Date()); this.insert(accountChangeDetail); -- Gitblit v1.7.1