mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/per-boe/java-servers.git
synced 2025-12-20 00:06:53 +08:00
视频进行工号验证
This commit is contained in:
@@ -130,8 +130,15 @@ public class CourseWareApi extends ApiBaseController {
|
||||
}
|
||||
String userInfo = CacheName.NAME_INFO + ":"+ token;
|
||||
Object o = redisTemplate.opsForValue().get(userInfo);
|
||||
if (o == null) {
|
||||
log.error("从 Redis 获取的值为 null ,", userInfo);
|
||||
return badRequest("token验证错误");
|
||||
}
|
||||
// 将对象转换为字符串
|
||||
String userNoStr = o.toString();
|
||||
// 检查字符串是否为空或空白
|
||||
if (StringUtils.isBlank(userNoStr)) {
|
||||
log.error("从 Redis 获取的值为空或空白,", userInfo);
|
||||
return badRequest("token验证错误");
|
||||
}
|
||||
HashMap bean = JSONUtil.toBean(userNoStr, HashMap.class);
|
||||
|
||||
Reference in New Issue
Block a user