|  |  |  | 
|---|
|  |  |  | package com.doumee.api.web; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.doumee.config.Jwt.JwtTokenUtil; | 
|---|
|  |  |  | import com.doumee.dao.business.model.Member; | 
|---|
|  |  |  | import lombok.extern.slf4j.Slf4j; | 
|---|
|  |  |  | import org.apache.poi.ss.formula.ptg.MemAreaPtg; | 
|---|
|  |  |  | import org.springframework.web.context.request.RequestContextHolder; | 
|---|
|  |  |  | import org.springframework.web.context.request.ServletRequestAttributes; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | return request; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 获取用户ID | 
|---|
|  |  |  | * | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | protected Long getMemberId() { | 
|---|
|  |  |  | Object obj = this.getRequest().getAttribute(JwtTokenUtil.UserId_Name); | 
|---|
|  |  |  | return obj != null ? (Long) obj : null; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | protected Long getUserType() { | 
|---|
|  |  |  | Object obj = this.getRequest().getAttribute(JwtTokenUtil.UserType); | 
|---|
|  |  |  | return obj != null ? (Long) obj : null; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|