From f2e69091f00c5a28e92b5a810e5b571842365d7a Mon Sep 17 00:00:00 2001 From: sdy Date: Wed, 17 Jun 2026 17:09:27 +0800 Subject: [PATCH] =?UTF-8?q?=E6=99=BA=E7=9C=B8token=E7=BC=93=E5=AD=98?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/business/service/impl/ZhiMouServiceImpl.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/admin/src/main/java/com/multictrl/modules/business/service/impl/ZhiMouServiceImpl.java b/admin/src/main/java/com/multictrl/modules/business/service/impl/ZhiMouServiceImpl.java index d0c85ab..9a8063a 100644 --- a/admin/src/main/java/com/multictrl/modules/business/service/impl/ZhiMouServiceImpl.java +++ b/admin/src/main/java/com/multictrl/modules/business/service/impl/ZhiMouServiceImpl.java @@ -118,7 +118,7 @@ public class ZhiMouServiceImpl implements ZhiMouService { @Override public ZhiMouInfo getToken() { - Object tokenObj = CacheUtils.get(BusinessConstant.ZHIMOU_TOKEN); + Object tokenObj = CacheUtils.getWithoutReset(BusinessConstant.ZHIMOU_TOKEN); if (tokenObj instanceof ZhiMouInfo) { return (ZhiMouInfo) tokenObj; } @@ -155,8 +155,8 @@ public class ZhiMouServiceImpl implements ZhiMouService { info.setUrl(url); info.setToken(result.getJSONObject("data").getString("token")); info.setExpire(result.getJSONObject("data").getLong("expires_at")); - //官方说过期2小时,这里设置1小时缓存 - CacheUtils.set(BusinessConstant.ZHIMOU_TOKEN, info); + //官方说过期2小时,这里设置半小时缓存 + CacheUtils.set(BusinessConstant.ZHIMOU_TOKEN, info, 30 * 60 * 1000); return info; }