diff --git a/youlai-common/common-security/src/main/java/com/youlai/common/security/util/SecurityUtils.java b/youlai-common/common-security/src/main/java/com/youlai/common/security/util/SecurityUtils.java index 77ccc957c..3d33dd23a 100644 --- a/youlai-common/common-security/src/main/java/com/youlai/common/security/util/SecurityUtils.java +++ b/youlai-common/common-security/src/main/java/com/youlai/common/security/util/SecurityUtils.java @@ -59,14 +59,25 @@ public class SecurityUtils { return String.valueOf(getTokenAttributes().get("jti")); } + public static Long getExp() { - return Convert.toLong(getTokenAttributes().get("jti")); + return Convert.toLong(getTokenAttributes().get("exp")); } + /** + * 获取数据权限范围 + * + * @return + */ public static Integer getDataScope() { return Convert.toInt(getTokenAttributes().get("dataScope")); } + /** + * 获取会员ID + * + * @return 会员ID + */ public static Long getMemberId() { return Convert.toLong(getTokenAttributes().get("memberId")); }