This commit is contained in:
lijiaqi 2023-12-26 17:26:01 +08:00
parent 75ae7333bc
commit 8304c356bb
1 changed files with 6 additions and 6 deletions

View File

@ -77,7 +77,7 @@ public class AuthServiceImpl extends BaseService<UserMapper, User> implements IA
if (!captcha.equalsIgnoreCase(captchaCache)) { if (!captcha.equalsIgnoreCase(captchaCache)) {
//获取IP失败次数 //获取IP失败次数
String cache = (String) redisUtils.getMapCache(RedissonConstant.LOGIN_FAIL_COUNT, 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)) { if (ObjectUtil.isNull(failCount)) {
failCount = 1; failCount = 1;
} else { } else {
@ -103,7 +103,7 @@ public class AuthServiceImpl extends BaseService<UserMapper, User> implements IA
if (ObjectUtil.isNull(loginUser)) { if (ObjectUtil.isNull(loginUser)) {
//获取IP失败次数 //获取IP失败次数
String cache = (String) redisUtils.getMapCache(RedissonConstant.LOGIN_FAIL_COUNT, 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)) { if (ObjectUtil.isNull(failCount)) {
failCount = 1; failCount = 1;
} else { } else {
@ -121,7 +121,7 @@ public class AuthServiceImpl extends BaseService<UserMapper, User> implements IA
if (!loginPassword.equals(loginUser.getPassword())) { if (!loginPassword.equals(loginUser.getPassword())) {
//获取IP失败次数 //获取IP失败次数
String cache = (String) redisUtils.getMapCache(RedissonConstant.LOGIN_FAIL_COUNT, 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)) { if (ObjectUtil.isNull(failCount)) {
failCount = 1; failCount = 1;
} else { } else {
@ -137,7 +137,7 @@ public class AuthServiceImpl extends BaseService<UserMapper, User> implements IA
if (!loginUser.getStatus()) { if (!loginUser.getStatus()) {
//获取IP失败次数 //获取IP失败次数
String cache = (String) redisUtils.getMapCache(RedissonConstant.LOGIN_FAIL_COUNT, 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)) { if (ObjectUtil.isNull(failCount)) {
failCount = 1; failCount = 1;
} else { } else {
@ -154,7 +154,7 @@ public class AuthServiceImpl extends BaseService<UserMapper, User> implements IA
if (StrUtil.isBlank(loginUser.getRoles())) { if (StrUtil.isBlank(loginUser.getRoles())) {
//获取IP失败次数 //获取IP失败次数
String cache = (String) redisUtils.getMapCache(RedissonConstant.LOGIN_FAIL_COUNT, 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)) { if (ObjectUtil.isNull(failCount)) {
failCount = 1; failCount = 1;
} else { } else {
@ -170,7 +170,7 @@ public class AuthServiceImpl extends BaseService<UserMapper, User> implements IA
List<Role> roleList = userService.roleListByUser(loginUser.getId()); List<Role> roleList = userService.roleListByUser(loginUser.getId());
if (CollUtil.isEmpty(roleList)) { //获取IP失败次数 if (CollUtil.isEmpty(roleList)) { //获取IP失败次数
String cache = (String) redisUtils.getMapCache(RedissonConstant.LOGIN_FAIL_COUNT, 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)) { if (ObjectUtil.isNull(failCount)) {
failCount = 1; failCount = 1;
} else { } else {