From 755900e5da3978edafa836accc923caa0c0edec2 Mon Sep 17 00:00:00 2001 From: caozehui <2427765068@qq.com> Date: Mon, 24 Feb 2025 10:40:29 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BE=AE=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/njcn/common/pojo/constant/SecurityConstants.java | 2 +- .../src/main/java/com/njcn/web/utils/RequestUtil.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/njcn-common/src/main/java/com/njcn/common/pojo/constant/SecurityConstants.java b/njcn-common/src/main/java/com/njcn/common/pojo/constant/SecurityConstants.java index 61294c7..aca33b3 100644 --- a/njcn-common/src/main/java/com/njcn/common/pojo/constant/SecurityConstants.java +++ b/njcn-common/src/main/java/com/njcn/common/pojo/constant/SecurityConstants.java @@ -44,7 +44,7 @@ public interface SecurityConstants { */ String USER_ID = "userId"; String USER_TYPE = "userType"; - String USER_NAME_KEY = "user_name"; + String USER_NAME_KEY = "name"; String USER_HEAD_KEY = "headSculpture"; String USER_NICKNAME_KEY = "nickname"; String CLIENT_ID_KEY = "client_id"; diff --git a/njcn-springboot/spingboot2.3.12/src/main/java/com/njcn/web/utils/RequestUtil.java b/njcn-springboot/spingboot2.3.12/src/main/java/com/njcn/web/utils/RequestUtil.java index 942ac67..c93f9cf 100644 --- a/njcn-springboot/spingboot2.3.12/src/main/java/com/njcn/web/utils/RequestUtil.java +++ b/njcn-springboot/spingboot2.3.12/src/main/java/com/njcn/web/utils/RequestUtil.java @@ -67,7 +67,7 @@ public class RequestUtil { String username = null; if (StrUtil.isNotBlank(userJson)) { JSONObject obj = JSONUtil.parseObj(userJson); - username = obj.getStr("username"); + username = obj.getStr(SecurityConstants.USER_NAME_KEY); } return username; }