From 8761644af158c5e7f05e999e9834b6496ce414e7 Mon Sep 17 00:00:00 2001
From: yeg <1347747024@qq.com>
Date: 星期六, 29 八月 2026 16:04:31 +0800
Subject: [PATCH] 优化采集器长时历史的有界读取

---
 ruoyi-device/src/main/java/com/ruoyi/device/bts/BtsDevelopmentSimulator.java |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/ruoyi-device/src/main/java/com/ruoyi/device/bts/BtsDevelopmentSimulator.java b/ruoyi-device/src/main/java/com/ruoyi/device/bts/BtsDevelopmentSimulator.java
index 5548804..707cc65 100644
--- a/ruoyi-device/src/main/java/com/ruoyi/device/bts/BtsDevelopmentSimulator.java
+++ b/ruoyi-device/src/main/java/com/ruoyi/device/bts/BtsDevelopmentSimulator.java
@@ -210,8 +210,7 @@
     public synchronized CollectorHistoryPage collectorHistory(int collectorId, long offset, int limit)
     {
         CollectorState collector = requireCollector(collectorId);
-        return DevelopmentCollectorSimulation.history(collector,
-                stateStore.loadCollectorHistory(collector.deviceCode()), offset, limit);
+        return DevelopmentCollectorSimulation.history(collector, stateStore, offset, limit);
     }
 
     /** 返回控制页需要的运行状态快照。 */
@@ -518,8 +517,7 @@
                     || !isIpv4(collector.ip()) || !ips.add(collector.ip())
                     || collector.channelCount() < 1 || collector.channelCount() > MAX_CHANNEL_COUNT)
                 throw new IllegalStateException("Invalid BTS simulator collector state in Redis");
-            DevelopmentCollectorSimulation.validate(collector,
-                    stateStore.loadCollectorHistory(collector.deviceCode()));
+            DevelopmentCollectorSimulation.validate(collector, stateStore);
             maximumCollectorId = Math.max(maximumCollectorId, collector.collectorId());
         }
         java.util.Set<String> tombstoneIds = new java.util.HashSet<>();

--
Gitblit v1.7.1