diff --git a/arex-storage-web-api/src/main/java/com/arextest/storage/service/ScenePoolService.java b/arex-storage-web-api/src/main/java/com/arextest/storage/service/ScenePoolService.java index c5cc9c41..080db967 100644 --- a/arex-storage-web-api/src/main/java/com/arextest/storage/service/ScenePoolService.java +++ b/arex-storage-web-api/src/main/java/com/arextest/storage/service/ScenePoolService.java @@ -27,6 +27,7 @@ public class ScenePoolService { private static final int DEFAULT_LIMIT = 200; private static final String CLEAR_LIMIT_KEY = "clear.pool.limit"; private static final int MAX_PAGE_SIZE = 300; + private static final int MAX_PAGE_INDEX = 200; private static final int MAX_ITERATIONS = 200; private static final int MAX_LIMIT = 5000; private static final int MIN_LIMIT = 0; @@ -84,8 +85,14 @@ public SceneDTO findRecordsByAppId(String appId, String category, Integer pageIn } pageSize = Math.min(pageSize, MAX_PAGE_SIZE); + pageIndex = Math.min(pageIndex, MAX_PAGE_INDEX); SceneDTO sceneDTO = new SceneDTO(); + if (pageIndex == MAX_PAGE_INDEX) { + sceneDTO.setTotal(0L); + sceneDTO.setSceneList(Collections.emptyList()); + return sceneDTO; + } long count = provider.countByAppId(appId); sceneDTO.setTotal(count); if (count == 0L) { diff --git a/pom.xml b/pom.xml index bdc7703f..8c0d3c09 100644 --- a/pom.xml +++ b/pom.xml @@ -449,7 +449,7 @@ - 2.0.8 + 2.0.9 3.3.2 1.8