| | |
| | | @Override |
| | | public ResultUtil driverWork(Integer driverId) throws Exception { |
| | | Driver driver = driverService.selectById(driverId); |
| | | if(ToolUtil.isEmpty(driver.getMerchantNumber())){ |
| | | return ResultUtil.error("请先注册商户号"); |
| | | } |
| | | SystemConfig systemConfig = systemConfigService.selectOne(new EntityWrapper<SystemConfig>().eq("type", 6)); |
| | | Double num1 = JSON.parseObject(systemConfig.getContent()).getDouble("num1"); |
| | | if(driver.getBalance() == null || driver.getBalance().compareTo(num1) < 0){ |
| | |
| | | if(null != orderTransfer){ |
| | | int i = Double.valueOf((System.currentTimeMillis() - orderTransfer.getSuccessTime().getTime()) / 60000).intValue(); |
| | | if(num5 > i){ |
| | | return ResultUtil.error("暂时还无法上班,请稍后重试"); |
| | | return ResultUtil.error("暂时还无法上班,请" + (num5 - i) + "分钟后重试"); |
| | | } |
| | | } |
| | | |
| | | DriverWork driverWork = this.selectOne(new EntityWrapper<DriverWork>().eq("driverId", 1).eq("status", 1)); |
| | | DriverWork driverWork = this.selectOne(new EntityWrapper<DriverWork>().eq("driverId", driverId).eq("status", 1)); |
| | | if(null != driverWork){ |
| | | return ResultUtil.error("您正在上班中"); |
| | | } |