Commit 024029d7 by 穆龙飞

modify:修改拦截器

parent 95fca2e5
Pipeline #44855 failed with stages
in 2 minutes 51 seconds
...@@ -76,7 +76,11 @@ public class UserInterceptor implements HandlerInterceptor { ...@@ -76,7 +76,11 @@ public class UserInterceptor implements HandlerInterceptor {
log.info("userInfo: {}", JSON.toJSONString(userInfo)); log.info("userInfo: {}", JSON.toJSONString(userInfo));
if (userInfo != null) { if (userInfo != null) {
RequestLocalBean.setUid(userInfo.getUsername()); RequestLocalBean.setUid(userInfo.getUsername());
if (userInfo.getProfile() != null) {
RequestLocalBean.setName(userInfo.getProfile().getNickName()); RequestLocalBean.setName(userInfo.getProfile().getNickName());
} else {
RequestLocalBean.setName(userInfo.getUsername());
}
} }
} else { } else {
// 获取用户信息 // 获取用户信息
......
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