diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/context/SecurityContextHolder.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/context/SecurityContextHolder.java index ef20081..6c1357f 100644 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/context/SecurityContextHolder.java +++ b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/context/SecurityContextHolder.java @@ -77,6 +77,15 @@ public class SecurityContextHolder set(SecurityConstants.DETAILS_USERNAME, username); } + public static void setUserAgent(String userId,String useragent) + { + set("userId", useragent); + } + public static String getUserAgent(String userId) + { + return get(userId); + } + public static String getUserKey() { return get(SecurityConstants.USER_KEY);