From 7e2c6594644e790d6bb59289bfad862dbc41c0b9 Mon Sep 17 00:00:00 2001 From: ronger Date: Fri, 14 Jan 2022 10:41:29 +0800 Subject: [PATCH] =?UTF-8?q?:art:=20=E6=A0=BC=E5=BC=8F=E5=8C=96=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/rymcu/forest/util/UserUtils.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/rymcu/forest/util/UserUtils.java b/src/main/java/com/rymcu/forest/util/UserUtils.java index 6899270..2343060 100644 --- a/src/main/java/com/rymcu/forest/util/UserUtils.java +++ b/src/main/java/com/rymcu/forest/util/UserUtils.java @@ -25,6 +25,7 @@ public class UserUtils { /** * 通过token获取当前用户的信息 + * * @return */ public static User getCurrentUserByToken() throws BaseApiException { @@ -52,7 +53,7 @@ public class UserUtils { } public static TokenUser getTokenUser(String token) { - if(StringUtils.isNotBlank(token)){ + if (StringUtils.isNotBlank(token)) { // 验证token Claims claims; try { @@ -65,7 +66,7 @@ public class UserUtils { TokenModel model = tokenManager.getToken(token, account.toString()); if (tokenManager.checkToken(model)) { User user = userMapper.findByAccount(account.toString()); - if(user != null){ + if (user != null) { TokenUser tokenUser = new TokenUser(); BeanCopierUtil.copy(user, tokenUser); tokenUser.setToken(token);