| | |
| | | @Autowired |
| | | private IRechargeRecordService rechargeRecordService; |
| | | |
| | | @Autowired |
| | | private IAgentService agentService; |
| | | |
| | | |
| | | |
| | | /** |
| | |
| | | driverInfo.setOnline(second); |
| | | } |
| | | driverInfo.setWechatAuthorization(driver.getOpenid() == null ? 0 : 1); |
| | | Agent agent = agentService.selectById(driver.getAgentId()); |
| | | driverInfo.setServiceCalls(agent.getServiceCalls()); |
| | | return driverInfo; |
| | | } |
| | | |
| | |
| | | rechargeRecord1.setOrderNumber(transaction_id); |
| | | rechargeRecordService.updateById(rechargeRecord1); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 修改密码 |
| | | * @param uid |
| | | * @param oldPass |
| | | * @param newPass |
| | | * @return |
| | | * @throws Exception |
| | | */ |
| | | @Override |
| | | public ResultUtil updatePassword(Integer uid, String oldPass, String newPass) throws Exception { |
| | | Driver driver = this.selectById(uid); |
| | | if(!ShiroKit.md5(oldPass, salt).equals(driver.getPassword())){ |
| | | return ResultUtil.error("原密码错误"); |
| | | } |
| | | newPass = ShiroKit.md5(newPass, salt); |
| | | driver.setPassword(newPass); |
| | | this.updateById(driver); |
| | | return ResultUtil.success(); |
| | | } |
| | | |
| | | /** |
| | | * 设置密码 |
| | | * @param uid |
| | | * @param password |
| | | * @return |
| | | * @throws Exception |
| | | */ |
| | | @Override |
| | | public ResultUtil recoverPassword(Integer uid, String password) throws Exception { |
| | | Driver driver = this.selectById(uid); |
| | | password = ShiroKit.md5(password, salt); |
| | | driver.setPassword(password); |
| | | this.updateById(driver); |
| | | return ResultUtil.success(); |
| | | } |
| | | } |