Commit efddec51 authored by m1991's avatar m1991

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

parent d66b84c2
......@@ -323,16 +323,15 @@ public class UserServiceImpl extends ServiceImpl<UsersMapper, User> implements U
/**
* 用户登出
*
* @param token
* @return
*/
@Override
public int logout(String token) {
int succ = 0;
// String key = RedisKeyUtils.formatKeyWithPrefix(token);
redisUtils.delete(token);
if (redisUtils.getValue(token) == null) {
String key = RedisKeyUtils.formatKeyWithPrefix(Constants.Redis.PREFIX_TOKEN, token);
redisUtils.delete(key);
if(redisUtils.getValue(key) == null){
succ = 1;
}
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