From 5220ac11b2df4eb4ee6edeb02091693d91adca59 Mon Sep 17 00:00:00 2001 From: dxfeng Date: Wed, 11 Mar 2026 15:49:00 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=8C=87=E5=AE=9A=E8=A1=A8?= =?UTF-8?q?=E7=9A=84=E5=BC=95=E7=94=A8=E7=8A=B6=E6=80=81=20=E5=85=BC?= =?UTF-8?q?=E5=AE=B9=E6=95=B0=E6=8D=AE=E9=87=8F=E5=A4=A7=E4=BA=8E1000?= =?UTF-8?q?=E7=9A=84=E5=9C=BA=E6=99=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/com/engine/organization/util/RefreshIsUsedUtil.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/com/engine/organization/util/RefreshIsUsedUtil.java b/src/com/engine/organization/util/RefreshIsUsedUtil.java index 9ea6f8c6..c63c62f0 100644 --- a/src/com/engine/organization/util/RefreshIsUsedUtil.java +++ b/src/com/engine/organization/util/RefreshIsUsedUtil.java @@ -117,8 +117,13 @@ public class RefreshIsUsedUtil { private static void RefreshIsUsedStatus(String tableName, List usedIds) { if (CollectionUtils.isNotEmpty(usedIds)) { List collect = Arrays.stream(String.join(",", usedIds).split(",")).collect(Collectors.toList()); - getRefreshUseMapper().updateIsUsedByIds(tableName, collect, 0); - getRefreshUseMapper().updateIsUsedByIds(tableName, collect, 1); + final int batchSize = 1000; + for (int i = 0; i < collect.size(); i += batchSize) { + int endIndex = Math.min(collect.size(), i + batchSize); + List batch = collect.subList(i, endIndex); + getRefreshUseMapper().updateIsUsedByIds(tableName, batch, 0); + getRefreshUseMapper().updateIsUsedByIds(tableName, batch, 1); + } } else { getRefreshUseMapper().initIsUseStatus(tableName); }