| | |
| | | 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(); |
| | |
| | | @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) { |