package com.fs.app.controller;


import com.fs.app.utils.JwtUtils;
import com.fs.common.core.redis.RedisCache;
import com.fs.common.utils.ServletUtils;
import io.jsonwebtoken.Claims;
import org.springframework.beans.factory.annotation.Autowired;


public class AppBaseController {
	@Autowired
	JwtUtils jwtUtils;
	@Autowired
	RedisCache redisCache;

	public String getDoctorId()
	{
		String headValue =  ServletUtils.getRequest().getHeader("APPToken");
		Claims claims=jwtUtils.getClaimByToken(headValue);
		String doctorId = claims.getSubject().toString();
		return doctorId;
	}


}
