|
@@ -135,17 +135,14 @@ public class AuthServiceImpl implements AuthService {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- // 登陆失败5次后需要图片验证码登陆,否则5分钟后才能登陆
|
|
|
Integer errorTimes = getLoginErrorTimes(accountTypeEnum, accountValue, clientIp);
|
|
|
- if (5 < errorTimes) {
|
|
|
- if (StringUtils.isNotBlank(sessionId) && StringUtils.isNotBlank(imgCode)) {
|
|
|
- String rightImgCode = redisClient.get("$_IMG_" + sessionId, String.class);
|
|
|
- if (null == rightImgCode || !rightImgCode.equalsIgnoreCase(imgCode)) {
|
|
|
- throw new StatusException("B-002303", "验证码错误");
|
|
|
- }
|
|
|
- } else {
|
|
|
- throw new StatusException("B-001205", "登陆失败次数已达到上限,请5分钟后重试");
|
|
|
+ if (StringUtils.isNotBlank(sessionId) && StringUtils.isNotBlank(imgCode)) {
|
|
|
+ String rightImgCode = redisClient.get("$_IMG_" + sessionId, String.class);
|
|
|
+ if (null == rightImgCode || !rightImgCode.equalsIgnoreCase(imgCode)) {
|
|
|
+ throw new StatusException("B-002303", "验证码错误");
|
|
|
}
|
|
|
+ } else if (5 < errorTimes) {
|
|
|
+ throw new StatusException("B-001205", "登陆失败次数已达到上限,请5分钟后重试");
|
|
|
}
|
|
|
|
|
|
StudentEntity student = null;
|