This commit is contained in:
Leo
2026-02-08 11:20:30 +08:00
parent c1484ecbfd
commit 549224a83f
2 changed files with 18 additions and 2 deletions

View File

@@ -1069,6 +1069,15 @@ public class TencentDocController extends BaseController {
endRow = rowTotal;
log.info("按 rowTotal={} 截断结束行: endRow={}", rowTotal, endRow);
}
} else {
// 未取到 rowTotal 时:若 startRow 过高(如 348 超出实际 324 行)可能是 Redis 缓存过时,保守回溯
final int START_ROW_SAFE_THRESHOLD = 350;
if (startRow > START_ROW_SAFE_THRESHOLD) {
int oldStart = startRow;
startRow = Math.max(MIN_START_ROW_WHEN_USE_ROW_TOTAL, effectiveStartRow);
endRow = startRow + READ_ROWS_WHEN_USE_ROW_TOTAL - 1;
log.warn("rowTotal 未获取且 startRow={} 过高,保守回溯至 effectiveStartRow={},范围: {} ~ {}", oldStart, startRow, startRow, endRow);
}
}
log.info("开始填充物流链接 - 文件ID: {}, 工作表ID: {}, 起始行: {}, 结束行: {}, rowTotal: {}",