Commit d98d9df9 by cjh

添加logout方法

parent 3ee0246b
......@@ -105,4 +105,11 @@ public class NoUiUtils {
}
}
public static Boolean logout(String userId,String type){
NoUiRequest noUiRequest = new NoUiRequest();
noUiRequest.setUserId(userId);
noUiRequest.setTerminalType(type);
return RedisUtil.delete(StringUtil.userUniqueId(noUiRequest));
}
}
......@@ -45,4 +45,8 @@ public class RedisUtil {
public static Object get(String key) {
return redisTemplate.opsForValue().get(key);
}
public static Boolean delete(String key){
return redisTemplate.delete(key);
}
}
\ No newline at end of file
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