|  |  |  | 
|---|
|  |  |  | package com.doumee.api; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.alibaba.fastjson.JSONObject; | 
|---|
|  |  |  | import com.doumee.config.jwt.JwtProperties; | 
|---|
|  |  |  | import com.doumee.core.constants.ResponseStatus; | 
|---|
|  |  |  | import com.doumee.core.exception.BusinessException; | 
|---|
|  |  |  | import com.doumee.core.model.LoginUserInfo; | 
|---|
|  |  |  | 
|---|
|  |  |  | import org.springframework.web.context.request.RequestContextHolder; | 
|---|
|  |  |  | import org.springframework.web.context.request.ServletRequestAttributes; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import javax.annotation.Resource; | 
|---|
|  |  |  | import javax.servlet.http.HttpServletRequest; | 
|---|
|  |  |  | import java.util.ArrayList; | 
|---|
|  |  |  | import java.util.List; | 
|---|
|  |  |  | import java.util.concurrent.TimeUnit; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * Controller基类 | 
|---|
|  |  |  | 
|---|
|  |  |  | * @author Eva.Caesar Liu | 
|---|
|  |  |  | * @date 2023/03/21 14:49 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | protected LoginUserInfo getLoginUser (String token) { | 
|---|
|  |  |  | public LoginUserInfo getLoginUser (String token) { | 
|---|
|  |  |  | if (token == null || token.isEmpty()) { | 
|---|
|  |  |  | return (LoginUserInfo)SecurityUtils.getSubject().getPrincipal(); | 
|---|
|  |  |  | //            throw new BusinessException(ResponseStatus.NO_LOGIN.getCode(),"未登录"); | 
|---|