From 831e3312572cf29dd91cbd882ef3dce809ac852d Mon Sep 17 00:00:00 2001
From: xuhy <3313886187@qq.com>
Date: 星期三, 14 六月 2023 20:58:04 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/1.1' into 1.1

---
 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