mirror of
https://gitee.com/wangkang/udf.git
synced 2026-10-30 11:43:47 +00:00
更新
This commit is contained in:
+7
@@ -5,6 +5,7 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.itkk.udf.api.common.CommonConstant;
|
||||
import org.itkk.udf.api.common.CommonProperties;
|
||||
import org.itkk.udf.starter.cache.db.dto.DbCacheDto;
|
||||
import org.itkk.udf.starter.cache.db.service.DbCacheService;
|
||||
import org.itkk.udf.starter.core.CoreUtil;
|
||||
import org.itkk.udf.starter.core.exception.AuthException;
|
||||
@@ -41,6 +42,12 @@ public class WebHandlerInterceptor implements HandlerInterceptor {
|
||||
if (StringUtils.isBlank(token)) {
|
||||
throw new AuthException("缺少必要参数token");
|
||||
}
|
||||
//获得token信息
|
||||
DbCacheDto dbCacheDto = dbCacheService.getDto(token);
|
||||
//判空
|
||||
if (dbCacheDto == null) {
|
||||
throw new AuthException("token不存在");
|
||||
}
|
||||
}
|
||||
//正常返回
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user