This commit is contained in:
yutou 2021-05-28 18:32:55 +08:00
parent 470d07d416
commit be3e3bbf9d
2 changed files with 44 additions and 40 deletions

View File

@ -350,7 +350,7 @@ public class Live implements ApplicationContextAware {
BilibiliLiveData liveData = new BilibiliLiveData();
String danmu;
GiftData giftData;
Log.i(AppTools.getToDayTimeToString(startTime),roomId,json.toJSONString());
Log.i(AppTools.getToDayTime(),roomId,json.toJSONString());
switch (json.getString("cmd")) {
case "INTERACT_WORD"://普通用户进直播间
danmu = json.getJSONObject("data").getString("uname") + " 进入到直播间";

View File

@ -47,7 +47,11 @@ public class APIFilter implements Filter {
) {
filterChain.doFilter(servletRequest, servletResponse);
} else {
UUser user= service.getUserToUid(Integer.parseInt(RedisTools.get(token)));;
if (StringUtils.isEmpty(token)) {
response.sendRedirect("/");
return;
}
UUser user = service.getUserToUid(Integer.parseInt(RedisTools.get(token)));
if (user == null) {
response.sendRedirect("/");
} else {