mirror of
http://git.pig4cloud.com/pig/pigx.git
synced 2026-11-08 20:49:00 +08:00
fix(upms): 修复用户登录失败次数缓存清理问题
- 在用户登录成功时清理对应的登录失败次数缓存 - 使用RedisUtils删除格式化的缓存key - 防止因缓存残留导致用户被错误锁定
This commit is contained in:
1 parent
a25963323b
commit
6de57dfab1
1 file changed
+5
+5
@@ -347,6 +347,11 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
|
||||
});
|
||||
}
|
||||
|
||||
// 同时清理用户失败次数的缓存
|
||||
String key = String.format("%s%s:%s", CacheConstants.GLOBALLY
|
||||
, CacheConstants.LOGIN_ERROR_TIMES, userDto.getUsername());
|
||||
RedisUtils.delete(key);
|
||||
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user