| | |
| | | user = new User(); |
| | | user.setUserNo(String.format(Constants.USER_NO_PRE, RandomUtil.randomNumbers(Constants.EIGHT))); |
| | | user.setState(Constants.ONE); |
| | | user.setPhone(phoneNumber); |
| | | user.setProfilePicture(profilePicture); |
| | | user.setNickname(String.format(Constants.USER_NO_PRE, StringUtils.getCharAndNum(Constants.SIX))); |
| | | user.setState(Constants.ONE); |
| | |
| | | } else { |
| | | Integer state = user.getState(); |
| | | if (state == 0) { |
| | | throw new GlobalException("该账号未开启,无法进行登录!"); |
| | | throw new GlobalException("账号已被禁用,请联系平台管理员。"); |
| | | } |
| | | } |
| | | // 校验通过,生成token及过期时间 |