|
@@ -6,6 +6,7 @@ import fcb.project.manager.base.entity.ContextTokenBean;
|
|
import fdage.back.sdk.base.entity.Result;
|
|
import fdage.back.sdk.base.entity.Result;
|
|
import fdage.back.sdk.base.enums.ResultCodeEnum;
|
|
import fdage.back.sdk.base.enums.ResultCodeEnum;
|
|
import fdage.back.sdk.base.exception.CommonBaseException;
|
|
import fdage.back.sdk.base.exception.CommonBaseException;
|
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.data.redis.core.RedisTemplate;
|
|
import org.springframework.data.redis.core.RedisTemplate;
|
|
|
|
|
|
@@ -32,6 +33,9 @@ public class BaseController {
|
|
|
|
|
|
protected ContextTokenBean getContextUserInfo(){
|
|
protected ContextTokenBean getContextUserInfo(){
|
|
String token = request.getHeader(TOKEN);
|
|
String token = request.getHeader(TOKEN);
|
|
|
|
+ if(StringUtils.isNotBlank(token)){
|
|
|
|
+ return null;
|
|
|
|
+ }
|
|
JSONObject tokenJsonObj = (JSONObject) redisTemplate.opsForValue().get(token);
|
|
JSONObject tokenJsonObj = (JSONObject) redisTemplate.opsForValue().get(token);
|
|
if(null == tokenJsonObj){
|
|
if(null == tokenJsonObj){
|
|
throw new CommonBaseException(3004 , "token失效");
|
|
throw new CommonBaseException(3004 , "token失效");
|