| | |
| | | import com.panzhihua.common.constants.TokenConstant; |
| | | import com.panzhihua.common.constants.UserConstants; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import io.swagger.models.auth.In; |
| | | import org.springframework.util.ObjectUtils; |
| | | import org.springframework.web.context.request.RequestContextHolder; |
| | | import org.springframework.web.context.request.ServletRequestAttributes; |
| | |
| | | * 获取登录对象信息 |
| | | * @return |
| | | */ |
| | | public Long getUserId(){ |
| | | public Integer getUserId(){ |
| | | HttpServletRequest request = this.getRequest(); |
| | | Long header = Long.valueOf(request.getHeader(UserConstants.USER_ID)); |
| | | Integer header = Integer.valueOf(request.getHeader(UserConstants.USER_ID)); |
| | | boolean empty = ObjectUtils.isEmpty(header); |
| | | if (empty) { |
| | | return null; |