Commit a2d6c40b by fanjiaxin

用户信息加入unionId

parent 36d0a86b
Pipeline #71951 passed with stages
in 1 minute 7 seconds
......@@ -4,10 +4,8 @@ import com.netease.yanxuan.wx.store.sharer.biz.core.LoginUserContextHolder;
import com.netease.yanxuan.wx.store.sharer.biz.core.LoginUserHelper;
import com.netease.yanxuan.wx.store.sharer.biz.core.LoginUserInfo;
import com.netease.yanxuan.wx.store.sharer.common.constant.CoreConstant;
import com.netease.yanxuan.wx.store.sharer.common.exception.NoAuthException;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
import org.springframework.stereotype.Component;
import org.springframework.web.servlet.HandlerInterceptor;
......@@ -31,9 +29,6 @@ public class UserInterceptor implements HandlerInterceptor {
String token = request.getHeader(CoreConstant.AUTH_HEADER_TOKEN_KEY);
LoginUserInfo loginUserInfo = loginUserHelper.getLoginUserInfo(token);
if (null != loginUserInfo) {
if (StringUtils.isBlank(loginUserInfo.getUnionId())) {
throw new NoAuthException("用户登录状态过期");
}
// 刷新缓存
loginUserHelper.setLoginUserInfo(token, loginUserInfo);
LoginUserContextHolder.set(loginUserInfo);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment