guyue
2 天以前 d6f6c00fba32fccd5685056bfa1b9ebba0614464
手机登录验证改回
1个文件已修改
46 ■■■■ 已修改文件
UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/UserInfoServiceImpl.java 46 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/UserInfoServiceImpl.java
@@ -235,25 +235,25 @@
            nickName = userInfo.getNickName();
        }
        //调中台接口查询用户
//        List<QYTUserInfo> infoByPhone = UserUtil.getUserInfoByPhone(phone);
//        if (null == infoByPhone || infoByPhone.isEmpty()) {
//            RegisterViaMobileRequest request = new RegisterViaMobileRequest();
//            request.setMobile(phone);
//            request.setEncryptType("aesbase64");
//            request.setPassword(AESUtils.encryptBase64("123456"));
//            request.setNickname(nickName);
//            request.setVerify_code(code);
//            request.setVerify_code_type("0");
//            RegisterViaMobile register = UserUtil.registerViaMobile(request);
//            if (!"0".equals(register.getStatus())) {
//                return ResultUtil.error(register.getDesc());
//            }
//        } else {
//            boolean b = this.checkCaptcha(phone, code);
//            if (!b) {
//                return ResultUtil.error("验证码无效");
//            }
//        }
        List<QYTUserInfo> infoByPhone = UserUtil.getUserInfoByPhone(phone);
        if (null == infoByPhone || infoByPhone.isEmpty()) {
            RegisterViaMobileRequest request = new RegisterViaMobileRequest();
            request.setMobile(phone);
            request.setEncryptType("aesbase64");
            request.setPassword(AESUtils.encryptBase64("123456"));
            request.setNickname(nickName);
            request.setVerify_code(code);
            request.setVerify_code_type("0");
            RegisterViaMobile register = UserUtil.registerViaMobile(request);
            if (!"0".equals(register.getStatus())) {
                return ResultUtil.error(register.getDesc());
            }
        } else {
            boolean b = this.checkCaptcha(phone, code);
            if (!b) {
                return ResultUtil.error("验证码无效");
            }
        }
    
        if (null == userInfo) {
            userInfo = new UserInfo();
@@ -476,10 +476,10 @@
    @Override
    public ResultUtil<LoginWarpper> userLogin(String phone, String password,String loginType) throws Exception {
        //调中台接口查询用户
//        List<QYTUserInfo> infoByPhone = UserUtil.getUserInfoByPhone(phone);
//        if (null == infoByPhone || infoByPhone.isEmpty()) {
//            return ResultUtil.error("账号无效");
//        }
        List<QYTUserInfo> infoByPhone = UserUtil.getUserInfoByPhone(phone);
        if (null == infoByPhone || infoByPhone.isEmpty()) {
            return ResultUtil.error("账号无效");
        }
    
        UserInfo userInfo = this.queryByPhone(phone);
        if (null == userInfo) {