From 9b68c6e4d6a3659443280fe261447d18d84ba62a Mon Sep 17 00:00:00 2001 From: zhibing.pu <393733352@qq.com> Date: 星期一, 13 五月 2024 11:01:58 +0800 Subject: [PATCH] 新增加接口 --- DriverIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/OrderServiceImpl.java | 13 ++++++++++--- 1 files changed, 10 insertions(+), 3 deletions(-) diff --git a/DriverIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/OrderServiceImpl.java b/DriverIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/OrderServiceImpl.java index 79de04c..d63347f 100644 --- a/DriverIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/OrderServiceImpl.java +++ b/DriverIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/OrderServiceImpl.java @@ -100,6 +100,9 @@ @Autowired private ISettlementRecordService settlementRecordService; + + @Resource + private IBalanceUsageRecordService balanceUsageRecordService; @@ -1088,7 +1091,7 @@ for(OrderPrivateCar order : orderList){ if(order.getSmsTime()==null ){ - if(order.getGetoffTime().getTime()+24*60*60*1000L<day.getTime()){ + if(null != order.getGetoffTime() && order.getGetoffTime().getTime()+24*60*60*1000L<day.getTime()){ order.setSmsNumber(order.getSmsNumber()+1); order.setSmsTime(day); //发送短信 @@ -1207,14 +1210,18 @@ } if(payType == 3){//余额支付 driver.setBalance(driver.getBalance() - money); - if(driver.getLaveBusinessMoney().compareTo(money) < 0){ - double b = money - driver.getLaveBusinessMoney(); + Double laveBusinessMoney = driver.getLaveBusinessMoney(); + if(laveBusinessMoney.compareTo(money) < 0){ + double b = money - laveBusinessMoney; driver.setLaveBusinessMoney(0D); driver.setLaveActivityMoney(driver.getLaveActivityMoney() - b); driverService.updateById(driver); + balanceUsageRecordService.saveBalanceUsageRecord(driver.getId(), 1, b, orderType == 1 ? 1 : 2); + balanceUsageRecordService.saveBalanceUsageRecord(driver.getId(), 2, laveBusinessMoney, orderType == 1 ? 1 : 2); }else{ driver.setLaveBusinessMoney(driver.getLaveBusinessMoney() - money); driverService.updateById(driver); + balanceUsageRecordService.saveBalanceUsageRecord(driver.getId(), 2, money, orderType == 1 ? 1 : 2); } if(orderType == 1){//专车 -- Gitblit v1.7.1