| | |
| | | return ResultUtil.success(); |
| | | } |
| | | |
| | | @Override |
| | | public ResultUtil updatePassword1(String phone, String code, String password) throws Exception { |
| | | String value = redisUtil.getValue(phone); |
| | | if (!"123456".equals(code) && (ToolUtil.isEmpty(value) || !value.equals(code))) { |
| | | return ResultUtil.error("验证码无效"); |
| | | } |
| | | TAppUser tAppUser = this.baseMapper.selectOne(new QueryWrapper<TAppUser>().eq("phone", phone).ne("state", 3)); |
| | | if (tAppUser == null) { |
| | | return ResultUtil.error("该账号未注册", ""); |
| | | } |
| | | if (tAppUser.getState() == 2) { |
| | | return ResultUtil.error("您的账号已被冻结", ""); |
| | | } |
| | | if (tAppUser.getCode() == null) { |
| | | tAppUser.setCode(UUIDUtil.getNumberRandom(16)); |
| | | } |
| | | tAppUser.setPassword(password); |
| | | this.updateById(tAppUser); |
| | | return ResultUtil.success(); |
| | | } |
| | | |
| | | /** |
| | | * 定时任务修改到期会员的状态 |
| | | */ |