| | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.supersavedriving.driver.modular.system.dao.AccountChangeDetailMapper; |
| | | import com.supersavedriving.driver.modular.system.model.AccountChangeDetail; |
| | | import com.supersavedriving.driver.modular.system.model.Driver; |
| | | import com.supersavedriving.driver.modular.system.model.RechargeRecord; |
| | | import com.supersavedriving.driver.modular.system.model.SystemConfig; |
| | | import com.supersavedriving.driver.modular.system.model.*; |
| | | import com.supersavedriving.driver.modular.system.service.*; |
| | | import com.supersavedriving.driver.modular.system.util.ResultUtil; |
| | | import com.supersavedriving.driver.modular.system.util.UUIDUtil; |
| | |
| | | |
| | | @Autowired |
| | | private IOrderService orderService; |
| | | |
| | | @Autowired |
| | | private IRevenueService revenueService; |
| | | |
| | | @Autowired |
| | | private ICompanyFundFlowService companyFundFlowService; |
| | | |
| | | |
| | | |
| | |
| | | Double num1 = jsonObject.getDouble("num1"); |
| | | List<Driver> drivers = driverService.selectList(new EntityWrapper<Driver>().eq("approvalStatus", 2).eq("status", 1)); |
| | | for (Driver driver : drivers) { |
| | | Double balance1 = revenueService.queryCompanyBalance(); |
| | | Double backgroundBalance = driver.getBackgroundBalance(); |
| | | Double balance = driver.getBalance(); |
| | | double all = backgroundBalance + balance; |
| | |
| | | accountChangeDetail.setCreateTime(new Date()); |
| | | this.insert(accountChangeDetail); |
| | | |
| | | Revenue revenue = new Revenue(); |
| | | revenue.setType(3); |
| | | revenue.setUserType(4); |
| | | revenue.setAmount(d); |
| | | revenue.setCreateTime(new Date()); |
| | | revenueService.insert(revenue); |
| | | |
| | | List<RechargeRecord> rechargeRecords = rechargeRecordService.selectList(new EntityWrapper<RechargeRecord>().eq("type", 2).eq("userId", driver.getId()).eq("payStatus", 2).gt("surplusDividedAmount", 0).orderBy("createTime")); |
| | | for (RechargeRecord rechargeRecord : rechargeRecords) { |
| | | Double surplusDividedAmount = rechargeRecord.getSurplusDividedAmount(); |
| | |
| | | |
| | | } |
| | | } |
| | | |
| | | driverService.updateById(driver); |
| | | |
| | | CompanyFundFlow companyFundFlow = new CompanyFundFlow(); |
| | | companyFundFlow.setType(4); |
| | | companyFundFlow.setObjectType(1); |
| | | companyFundFlow.setBalance(new BigDecimal(balance1)); |
| | | companyFundFlow.setMoney(new BigDecimal(num1)); |
| | | companyFundFlow.setCreateTime(new Date()); |
| | | companyFundFlowService.insert(companyFundFlow); |
| | | } |
| | | } |
| | | } |