From 7b7f8de2de28e511983e15bd52a5b3b172738970 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8D=92?= Date: Fri, 7 Nov 2025 15:48:43 +0800 Subject: [PATCH] 1 --- .../impl/TencentDocDelayedPushServiceImpl.java | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/ruoyi-system/src/main/java/com/ruoyi/jarvis/service/impl/TencentDocDelayedPushServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/jarvis/service/impl/TencentDocDelayedPushServiceImpl.java index 08d78b9..9ff2d89 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/jarvis/service/impl/TencentDocDelayedPushServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/jarvis/service/impl/TencentDocDelayedPushServiceImpl.java @@ -257,13 +257,19 @@ public class TencentDocDelayedPushServiceImpl implements ITencentDocDelayedPushS try { log.info("开始执行批量同步..."); - // 获取配置信息 - String fileId = tencentDocConfig.getFileId(); - String sheetId = tencentDocConfig.getSheetId(); - Integer startRow = tencentDocConfig.getStartRow(); + // 从 Redis 读取配置信息(用户通过前端配置页面设置) + String fileId = redisCache.getCacheObject("tendoc:config:fileId"); + String sheetId = redisCache.getCacheObject("tendoc:config:sheetId"); + Integer startRow = redisCache.getCacheObject("tendoc:config:startRow"); + + if (startRow == null) { + startRow = 3; // 默认值 + } + + log.info("读取配置 - fileId: {}, sheetId: {}, startRow: {}", fileId, sheetId, startRow); if (StringUtils.isEmpty(fileId) || StringUtils.isEmpty(sheetId)) { - log.error("腾讯文档配置不完整,无法执行批量同步"); + log.error("腾讯文档配置不完整,无法执行批量同步。请先在前端配置页面设置文件ID和工作表ID"); return; }