puzhibing
2023-12-04 3ad6b6ba2ba56fc0bcd2130e47190779c6e15acc
cloud-server-account/src/main/java/com/dsh/account/service/impl/TAppUserServiceImpl.java
@@ -651,6 +651,27 @@
        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();
    }
    /**
     * 定时任务修改到期会员的状态
     */