| | |
| | | import com.stylefeng.guns.modular.system.dao.DriverWorkMapper; |
| | | import com.stylefeng.guns.modular.system.dao.TUseMoneyMapper; |
| | | import com.stylefeng.guns.modular.system.model.*; |
| | | import com.stylefeng.guns.modular.system.service.IDriverService; |
| | | import com.stylefeng.guns.modular.system.service.IOrderCancelService; |
| | | import com.stylefeng.guns.modular.system.service.IOrderService; |
| | | import com.stylefeng.guns.modular.system.service.IReassignService; |
| | | import com.stylefeng.guns.modular.system.service.*; |
| | | import com.stylefeng.guns.modular.system.util.ChinaMobileUtil; |
| | | import com.stylefeng.guns.modular.system.util.PushUtil; |
| | | import com.stylefeng.guns.modular.system.util.ResultUtil; |
| | |
| | | |
| | | @Autowired |
| | | private IDriverService driverService; |
| | | @Autowired |
| | | private ICompanyService companyService; |
| | | |
| | | @Autowired |
| | | private IReassignService reassignService; |
| | |
| | | } |
| | | |
| | | |
| | | @Autowired |
| | | private TUseMoneyMapper useMoneyMapper; |
| | | @Resource |
| | | private DriverWorkMapper driverWorkMapper; |
| | | @Autowired |
| | |
| | | } |
| | | // 抢单的时候 判断司机当前余额是否足够支付一笔软件使用费 |
| | | Driver driver = driverService.selectById(uid); |
| | | List<TUseMoney> tUseMoney = useMoneyMapper.selectList(null); |
| | | |
| | | if (tUseMoney.get(0).getMoney() > driver.getBalance()) { |
| | | // List<TUseMoney> tUseMoney = useMoneyMapper.selectList(null); |
| | | Company company = companyService.selectById(driver.getCompanyId()); |
| | | if (company.getDriverRestriction() > driver.getBalance()) { |
| | | // 将这个司机下线 |
| | | driver.setState(1); |
| | | driverService.updateById(driver); |