From bdce5e3086fc0d79fe2f2afe97f3ae8491292b2c Mon Sep 17 00:00:00 2001 From: wuweihua <88888888> Date: Mon, 26 Oct 2026 16:59:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=95=B0=E6=8D=AE=E6=BA=90?= =?UTF-8?q?=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/bms/price/task/TabOrderExportAsyncRunner.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bms-back/bms-system/src/main/java/com/bms/price/task/TabOrderExportAsyncRunner.java b/bms-back/bms-system/src/main/java/com/bms/price/task/TabOrderExportAsyncRunner.java index 0c6e193f..8ee8e0bc 100644 --- a/bms-back/bms-system/src/main/java/com/bms/price/task/TabOrderExportAsyncRunner.java +++ b/bms-back/bms-system/src/main/java/com/bms/price/task/TabOrderExportAsyncRunner.java @@ -37,7 +37,8 @@ public class TabOrderExportAsyncRunner public static final String CACHE_KEY_PREFIX = "monitor:orderSource:export:task:"; public static final int TTL_MINUTES = 60; public static final String REL_DIR = "orderSourceExport"; - public static final int PAGE_SIZE = 500; + /** Must stay <= TabOrderMonitorService.normalizePage max (200). */ + public static final int PAGE_SIZE = 200; /** 单次导出行数上限(防 OOM) */ public static final int EXPORT_MAX = 20000; @@ -103,7 +104,9 @@ public class TabOrderExportAsyncRunner int pct = Math.min(70, 5 + (int) ((all.size() * 65L) / Math.max(total, 1L))); put(taskId, TabOrderExportTask.STATUS_RUNNING, pct, "querying " + all.size() + "/" + total, null, fileName, null, all.size()); - if (all.size() >= total || rows.size() < PAGE_SIZE || all.size() >= EXPORT_MAX) + // Do not compare rows.size() to PAGE_SIZE: searchPage caps pageSize at 200. + // Stop only when all matched rows are collected or hard limit hit. + if (all.size() >= total || all.size() >= EXPORT_MAX) { break; }