|  | @@ -1,6 +1,7 @@
 | 
	
		
			
				|  |  |  package com.fs.app.controller;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +import cn.hutool.core.util.ObjectUtil;
 | 
	
		
			
				|  |  |  import com.fs.app.exception.FSException;
 | 
	
		
			
				|  |  |  import com.fs.app.utils.JwtUtils;
 | 
	
		
			
				|  |  |  import com.fs.common.core.redis.RedisCache;
 | 
	
	
		
			
				|  | @@ -34,7 +35,10 @@ public class AppBaseController {
 | 
	
		
			
				|  |  |  	{
 | 
	
		
			
				|  |  |  		String headValue =  ServletUtils.getRequest().getHeader("APPToken");
 | 
	
		
			
				|  |  |  		Claims claims=jwtUtils.getClaimByToken(headValue);
 | 
	
		
			
				|  |  | -		String userId = claims.getSubject().toString();
 | 
	
		
			
				|  |  | +		if (ObjectUtil.isEmpty(claims)){
 | 
	
		
			
				|  |  | +			throw new FSException("未授权,请先登录!");
 | 
	
		
			
				|  |  | +		}
 | 
	
		
			
				|  |  | +		String userId = claims.getSubject();
 | 
	
		
			
				|  |  |  		return userId;
 | 
	
		
			
				|  |  |  	}
 | 
	
		
			
				|  |  |  	public Long getCompanyUserId() {
 |