From 1fce4dbf01b056dec1fe39958c419507dfde5aa7 Mon Sep 17 00:00:00 2001 From: cabbage <281119120@qq.com> Date: Thu, 24 Apr 2025 10:48:22 +0800 Subject: [PATCH] =?UTF-8?q?##=20=E7=99=BB=E5=BD=95=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E7=BC=93=E5=AD=98=E8=BF=87=E6=9C=9F=E6=94=B9=E4=B8=BA1?= =?UTF-8?q?=E4=B8=AA=E5=B0=8F=E6=97=B6=EF=BC=8C=E5=88=B7=E6=96=B0=E6=A0=A1?= =?UTF-8?q?=E9=AA=8C=E6=94=B9=E4=B8=BA20=E5=88=86=E9=92=9F=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/hzs/common/core/constant/CacheConstants.java | 8 ++++---- .../hzs/common/security/service/MemberTokenService.java | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/hzs-common/hzs-common-core/src/main/java/com/hzs/common/core/constant/CacheConstants.java b/hzs-common/hzs-common-core/src/main/java/com/hzs/common/core/constant/CacheConstants.java index 533f84cf..fbfc1fb3 100644 --- a/hzs-common/hzs-common-core/src/main/java/com/hzs/common/core/constant/CacheConstants.java +++ b/hzs-common/hzs-common-core/src/main/java/com/hzs/common/core/constant/CacheConstants.java @@ -62,13 +62,13 @@ public class CacheConstants { public final static long LOGIN_TOKEN_REFRESH_TIME = 60; /** - * 权限缓存有效期,默认30(分钟) -- 30 + * 权限缓存有效期,默认60(分钟) */ - public final static long MEMBER_LOGIN_TOKEN_EXPIRATION = 30; + public final static long MEMBER_LOGIN_TOKEN_EXPIRATION = 60; /** - * 权限缓存刷新时间,默认10(分钟) + * 权限缓存刷新时间,默认20(分钟) */ - public final static long MEMBER_LOGIN_TOKEN_REFRESH_TIME = 10; + public final static long MEMBER_LOGIN_TOKEN_REFRESH_TIME = 20; /** diff --git a/hzs-common/hzs-common-security/src/main/java/com/hzs/common/security/service/MemberTokenService.java b/hzs-common/hzs-common-security/src/main/java/com/hzs/common/security/service/MemberTokenService.java index e903d740..1cbcfbb6 100644 --- a/hzs-common/hzs-common-security/src/main/java/com/hzs/common/security/service/MemberTokenService.java +++ b/hzs-common/hzs-common-security/src/main/java/com/hzs/common/security/service/MemberTokenService.java @@ -150,7 +150,7 @@ public class MemberTokenService { } /** - * 验证令牌有效期,相差不足10分钟,自动刷新缓存 + * 验证令牌有效期,相差不足20分钟,自动刷新缓存 * * @param loginMember 登录会员信息 */ @@ -169,7 +169,7 @@ public class MemberTokenService { * @param loginMember 登录信息 */ public void refreshToken(LoginMember loginMember) { - // 超时时间(30分钟) + // 超时时间(60分钟) long tmpExpireTime = EXPIRE_TIME; loginMember.setLoginTime(System.currentTimeMillis());