修改生成微信推广码
This commit is contained in:
parent
657dc8b4e3
commit
fc780c3513
@ -52,7 +52,7 @@ public class WxURLSchemeServiceImpl implements WxURLSchemeService {
|
|||||||
public CommonResult generateCommonWxUrlScheme() {
|
public CommonResult generateCommonWxUrlScheme() {
|
||||||
// 常量定义
|
// 常量定义
|
||||||
final String REDIS_KEY = "rdsCommonWxUrlScheme";
|
final String REDIS_KEY = "rdsCommonWxUrlScheme";
|
||||||
final long EXPIRE_DAYS = 30;
|
final long EXPIRE_DAYS = 365;
|
||||||
|
|
||||||
// === 第一阶段:尝试从Redis获取缓存 ===
|
// === 第一阶段:尝试从Redis获取缓存 ===
|
||||||
Object cachedScheme = redisService.get(REDIS_KEY);
|
Object cachedScheme = redisService.get(REDIS_KEY);
|
||||||
@ -85,7 +85,7 @@ public class WxURLSchemeServiceImpl implements WxURLSchemeService {
|
|||||||
requestBody.put("jump_wxa", jumpWxa);
|
requestBody.put("jump_wxa", jumpWxa);
|
||||||
requestBody.put("is_expire", true);
|
requestBody.put("is_expire", true);
|
||||||
requestBody.put("expire_type", 0);
|
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);
|
requestBody.put("expire_time", System.currentTimeMillis() / 1000 + expireSeconds);
|
||||||
|
|
||||||
// === 第三阶段:调用微信API ===
|
// === 第三阶段:调用微信API ===
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user