Commit efddec51 authored by m1991's avatar m1991

登录模块——用户退出-功能修复

parent d66b84c2
...@@ -323,16 +323,15 @@ public class UserServiceImpl extends ServiceImpl<UsersMapper, User> implements U ...@@ -323,16 +323,15 @@ public class UserServiceImpl extends ServiceImpl<UsersMapper, User> implements U
/** /**
* 用户登出 * 用户登出
*
* @param token * @param token
* @return * @return
*/ */
@Override @Override
public int logout(String token) { public int logout(String token) {
int succ = 0; int succ = 0;
// String key = RedisKeyUtils.formatKeyWithPrefix(token); String key = RedisKeyUtils.formatKeyWithPrefix(Constants.Redis.PREFIX_TOKEN, token);
redisUtils.delete(token); redisUtils.delete(key);
if (redisUtils.getValue(token) == null) { if(redisUtils.getValue(key) == null){
succ = 1; succ = 1;
} }
return succ; return succ;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment