From fc780c3513f729436560918e4a22f07a641336d4 Mon Sep 17 00:00:00 2001 From: Jack <46790855@qq.com> Date: Tue, 23 Dec 2025 15:37:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=94=9F=E6=88=90=E5=BE=AE?= =?UTF-8?q?=E4=BF=A1=E6=8E=A8=E5=B9=BF=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mall/shop/wechat/service/impl/WxURLSchemeServiceImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mall-shop/src/main/java/com/suisung/mall/shop/wechat/service/impl/WxURLSchemeServiceImpl.java b/mall-shop/src/main/java/com/suisung/mall/shop/wechat/service/impl/WxURLSchemeServiceImpl.java index 6408090b..1e4ae774 100644 --- a/mall-shop/src/main/java/com/suisung/mall/shop/wechat/service/impl/WxURLSchemeServiceImpl.java +++ b/mall-shop/src/main/java/com/suisung/mall/shop/wechat/service/impl/WxURLSchemeServiceImpl.java @@ -52,7 +52,7 @@ public class WxURLSchemeServiceImpl implements WxURLSchemeService { public CommonResult generateCommonWxUrlScheme() { // 常量定义 final String REDIS_KEY = "rdsCommonWxUrlScheme"; - final long EXPIRE_DAYS = 30; + final long EXPIRE_DAYS = 365; // === 第一阶段:尝试从Redis获取缓存 === Object cachedScheme = redisService.get(REDIS_KEY); @@ -85,7 +85,7 @@ public class WxURLSchemeServiceImpl implements WxURLSchemeService { requestBody.put("jump_wxa", jumpWxa); requestBody.put("is_expire", true); requestBody.put("expire_type", 0); - long expireSeconds = TimeUnit.DAYS.toSeconds(EXPIRE_DAYS); // 30天有效期 + long expireSeconds = TimeUnit.DAYS.toSeconds(EXPIRE_DAYS); requestBody.put("expire_time", System.currentTimeMillis() / 1000 + expireSeconds); // === 第三阶段:调用微信API ===