From 2fe78ec19291e0778dccca0252223d9925cffa27 Mon Sep 17 00:00:00 2001 From: Leo Date: Tue, 6 Jan 2026 18:44:16 +0800 Subject: [PATCH] 1 --- .../controller/jarvis/TencentDocConfigController.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/jarvis/TencentDocConfigController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/jarvis/TencentDocConfigController.java index 406eb4a..35b1d84 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/jarvis/TencentDocConfigController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/jarvis/TencentDocConfigController.java @@ -96,9 +96,11 @@ public class TencentDocConfigController extends BaseController { config.put("apiBaseUrl", tencentDocConfig.getApiBaseUrl()); // 获取当前同步进度(如果有配置) + // 注意:使用与 TencentDocController 相同的 Redis key 前缀 if (fileId != null && !fileId.isEmpty() && sheetId != null && !sheetId.isEmpty()) { - String syncProgressKey = "tencent:doc:sync:last_row:" + fileId + ":" + sheetId; + String syncProgressKey = "tendoc:last_row:" + fileId + ":" + sheetId; Integer currentProgress = redisCache.getCacheObject(syncProgressKey); + log.debug("读取同步进度 - key: {}, value: {}", syncProgressKey, currentProgress); if (currentProgress != null) { config.put("currentProgress", currentProgress); @@ -208,11 +210,12 @@ public class TencentDocConfigController extends BaseController { redisCache.setCacheObject(REDIS_KEY_PREFIX + "startRow", startRow, 180, TimeUnit.DAYS); // 清除该文档的同步进度(配置更新时重置进度,从新的startRow重新开始) - String syncProgressKey = "tencent:doc:sync:last_row:" + fileId.trim() + ":" + sheetId.trim(); + // 注意:使用与 TencentDocController 相同的 Redis key 前缀 + String syncProgressKey = "tendoc:last_row:" + fileId.trim() + ":" + sheetId.trim(); String configVersionKey = "tencent:doc:sync:config_version:" + fileId.trim() + ":" + sheetId.trim(); redisCache.deleteObject(syncProgressKey); redisCache.deleteObject(configVersionKey); - log.info("配置已更新,已清除同步进度,将从第 {} 行重新开始同步", startRow); + log.info("配置已更新,已清除同步进度 - key: {}, 将从第 {} 行重新开始同步", syncProgressKey, startRow); // 同时更新TencentDocConfig对象(内存中) tencentDocConfig.setFileId(fileId.trim());