From a5f324d85312e301d850e9632d8dd0ee8b982f86 Mon Sep 17 00:00:00 2001 From: wangjibo Date: Wed, 9 Aug 2023 20:25:18 +0800 Subject: [PATCH] =?UTF-8?q?loginDevice=20=E5=AD=97=E6=AE=B5=E5=B7=B2?= =?UTF-8?q?=E7=BB=8F=E8=A2=AB=E6=B6=88=E8=B4=B9=E4=BA=86=E6=89=80=E4=BB=A5?= =?UTF-8?q?=E8=BF=99=E9=87=8C=E9=9C=80=E8=A6=81=E6=96=B0=E5=88=9B=E5=BB=BA?= =?UTF-8?q?=E4=B8=80=E4=B8=AA=E5=AD=97=E6=AE=B5=20=E7=94=A8=E6=9D=A5?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E7=99=BB=E5=BD=95=E7=AB=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cn/axzo/framework/auth/domain/SystemAndDeviceInfo.java | 5 +++++ .../framework/auth/service/ContextInfoBuilderAspect.java | 2 ++ 2 files changed, 7 insertions(+) diff --git a/axzo-auth-spring-boot-starter/src/main/java/cn/axzo/framework/auth/domain/SystemAndDeviceInfo.java b/axzo-auth-spring-boot-starter/src/main/java/cn/axzo/framework/auth/domain/SystemAndDeviceInfo.java index 7756ba9..8a7e56c 100644 --- a/axzo-auth-spring-boot-starter/src/main/java/cn/axzo/framework/auth/domain/SystemAndDeviceInfo.java +++ b/axzo-auth-spring-boot-starter/src/main/java/cn/axzo/framework/auth/domain/SystemAndDeviceInfo.java @@ -15,6 +15,11 @@ public class SystemAndDeviceInfo { private String deviceNo; + /** + * 登录的端 + */ + private String device; + private String appVersion; private String ipAddress; diff --git a/axzo-auth-spring-boot-starter/src/main/java/cn/axzo/framework/auth/service/ContextInfoBuilderAspect.java b/axzo-auth-spring-boot-starter/src/main/java/cn/axzo/framework/auth/service/ContextInfoBuilderAspect.java index b5bb74c..0897bf8 100644 --- a/axzo-auth-spring-boot-starter/src/main/java/cn/axzo/framework/auth/service/ContextInfoBuilderAspect.java +++ b/axzo-auth-spring-boot-starter/src/main/java/cn/axzo/framework/auth/service/ContextInfoBuilderAspect.java @@ -317,6 +317,8 @@ public class ContextInfoBuilderAspect { try { fillLegacyGuess(contextInfo, userinfoMap); contextInfo.getSystemAndDeviceInfo().setLoginDevice(contextInfo.getTerminalInfo().getSimpleTerminal()); + // loginDevice 字段已经被消费了所以这里需要新创建一个字段 用来设置登录端 + contextInfo.getSystemAndDeviceInfo().setDevice((String) userinfoMap.get("loginDevice")); } catch (Exception e) { log.warn("fill legacy guess error for user identityId=" + userInfo.getIdentityId(), e); }