diff --git a/src/main/java/com/ydool/system/service/impl/AuthServiceImpl.java b/src/main/java/com/ydool/system/service/impl/AuthServiceImpl.java index f54e455..39cff92 100644 --- a/src/main/java/com/ydool/system/service/impl/AuthServiceImpl.java +++ b/src/main/java/com/ydool/system/service/impl/AuthServiceImpl.java @@ -77,7 +77,7 @@ public class AuthServiceImpl extends BaseService implements IA if (!captcha.equalsIgnoreCase(captchaCache)) { //获取IP失败次数 String cache = (String) redisUtils.getMapCache(RedissonConstant.LOGIN_FAIL_COUNT, ip); - Integer failCount = ObjectUtil.isNull(cache)? 1 : Integer.valueOf(cache) ; + Integer failCount = ObjectUtil.isNull(cache)? null : Integer.valueOf(cache) ; if (ObjectUtil.isNull(failCount)) { failCount = 1; } else { @@ -103,7 +103,7 @@ public class AuthServiceImpl extends BaseService implements IA if (ObjectUtil.isNull(loginUser)) { //获取IP失败次数 String cache = (String) redisUtils.getMapCache(RedissonConstant.LOGIN_FAIL_COUNT, ip); - Integer failCount = ObjectUtil.isNull(cache)? 1 : Integer.valueOf(cache) ; + Integer failCount = ObjectUtil.isNull(cache)? null : Integer.valueOf(cache) ; if (ObjectUtil.isNull(failCount)) { failCount = 1; } else { @@ -121,7 +121,7 @@ public class AuthServiceImpl extends BaseService implements IA if (!loginPassword.equals(loginUser.getPassword())) { //获取IP失败次数 String cache = (String) redisUtils.getMapCache(RedissonConstant.LOGIN_FAIL_COUNT, ip); - Integer failCount = ObjectUtil.isNull(cache)? 1 : Integer.valueOf(cache) ; + Integer failCount = ObjectUtil.isNull(cache)? null : Integer.valueOf(cache) ; if (ObjectUtil.isNull(failCount)) { failCount = 1; } else { @@ -137,7 +137,7 @@ public class AuthServiceImpl extends BaseService implements IA if (!loginUser.getStatus()) { //获取IP失败次数 String cache = (String) redisUtils.getMapCache(RedissonConstant.LOGIN_FAIL_COUNT, ip); - Integer failCount = ObjectUtil.isNull(cache)? 1 : Integer.valueOf(cache) ; + Integer failCount = ObjectUtil.isNull(cache)? null : Integer.valueOf(cache) ; if (ObjectUtil.isNull(failCount)) { failCount = 1; } else { @@ -154,7 +154,7 @@ public class AuthServiceImpl extends BaseService implements IA if (StrUtil.isBlank(loginUser.getRoles())) { //获取IP失败次数 String cache = (String) redisUtils.getMapCache(RedissonConstant.LOGIN_FAIL_COUNT, ip); - Integer failCount = ObjectUtil.isNull(cache)? 1 : Integer.valueOf(cache) ; + Integer failCount = ObjectUtil.isNull(cache)? null : Integer.valueOf(cache) ; if (ObjectUtil.isNull(failCount)) { failCount = 1; } else { @@ -170,7 +170,7 @@ public class AuthServiceImpl extends BaseService implements IA List roleList = userService.roleListByUser(loginUser.getId()); if (CollUtil.isEmpty(roleList)) { //获取IP失败次数 String cache = (String) redisUtils.getMapCache(RedissonConstant.LOGIN_FAIL_COUNT, ip); - Integer failCount = ObjectUtil.isNull(cache)? 1 : Integer.valueOf(cache) ; + Integer failCount = ObjectUtil.isNull(cache)? null : Integer.valueOf(cache) ; if (ObjectUtil.isNull(failCount)) { failCount = 1; } else {