diff --git a/pom.xml b/pom.xml
index 3336bb37..364e6b9e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -50,7 +50,6 @@
3.1.0
- 5.2.0
${project.build.directory}/generated-snippets
${project.basedir}/docs/asciidoc
${project.build.directory}/asciidoc
@@ -113,7 +112,7 @@
com.github.pagehelper
pagehelper-spring-boot-starter
- 1.2.10
+ 1.4.1
diff --git a/src/main/java/com/genersoft/iot/vmp/service/impl/StreamPushServiceImpl.java b/src/main/java/com/genersoft/iot/vmp/service/impl/StreamPushServiceImpl.java
index 63596b24..be34fae5 100644
--- a/src/main/java/com/genersoft/iot/vmp/service/impl/StreamPushServiceImpl.java
+++ b/src/main/java/com/genersoft/iot/vmp/service/impl/StreamPushServiceImpl.java
@@ -188,10 +188,23 @@ public class StreamPushServiceImpl implements IStreamPushService {
streamInfoPushItemMap.remove(streamPushItem.getApp() + streamPushItem.getStream());
}
}
- Collection offlinePushItems = pushItemMap.values();
+ List offlinePushItems = new ArrayList<>(pushItemMap.values());
if (offlinePushItems.size() > 0) {
String type = "PUSH";
- streamPushMapper.delAll(new ArrayList<>(offlinePushItems));
+ int runLimit = 300;
+ if (offlinePushItems.size() > runLimit) {
+ for (int i = 0; i < offlinePushItems.size(); i += runLimit) {
+ int toIndex = i + runLimit;
+ if (i + runLimit > offlinePushItems.size()) {
+ toIndex = offlinePushItems.size();
+ }
+ List streamPushItemsSub = offlinePushItems.subList(i, toIndex);
+ streamPushMapper.delAll(streamPushItemsSub);
+ }
+ }else {
+ streamPushMapper.delAll(offlinePushItems);
+ }
+
}
Collection offlineStreamInfoItems = streamInfoPushItemMap.values();
if (offlineStreamInfoItems.size() > 0) {
diff --git a/src/main/java/com/genersoft/iot/vmp/vmanager/streamPush/StreamPushController.java b/src/main/java/com/genersoft/iot/vmp/vmanager/streamPush/StreamPushController.java
index 5fcb6bd5..6dfc2575 100644
--- a/src/main/java/com/genersoft/iot/vmp/vmanager/streamPush/StreamPushController.java
+++ b/src/main/java/com/genersoft/iot/vmp/vmanager/streamPush/StreamPushController.java
@@ -40,7 +40,7 @@ public class StreamPushController {
@RequestParam(required = false)String query,
@RequestParam(required = false)Boolean online ){
- PageInfo pushList = streamPushService.getPushList(page - 1, page - 1 + count);
+ PageInfo pushList = streamPushService.getPushList(page, count);
return pushList;
}