From faafea471ffbc49934a4ba7c5304e4a3098aae1b Mon Sep 17 00:00:00 2001 From: song-tianyang Date: Wed, 20 Dec 2023 14:41:37 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E7=B3=BB=E7=BB=9F=E8=AE=BE=E7=BD=AE):?= =?UTF-8?q?=20=E4=BF=AE=E6=94=B9=E5=90=8E=E5=8F=B0=E5=88=86=E9=A1=B5?= =?UTF-8?q?=E6=9C=80=E5=A4=A7=E9=99=90=E5=88=B6=E6=9D=A1=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/metersphere/system/dto/sdk/BasePageRequest.java | 2 +- .../controller/OrganizationProjectControllerTests.java | 8 ++++---- .../system/controller/SystemProjectControllerTests.java | 8 ++++---- .../controller/param/BasePageRequestDefinition.java | 2 +- .../system/controller/user/UserControllerTests.java | 4 ++-- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/dto/sdk/BasePageRequest.java b/backend/services/system-setting/src/main/java/io/metersphere/system/dto/sdk/BasePageRequest.java index 25005a783e..b2399d7f50 100644 --- a/backend/services/system-setting/src/main/java/io/metersphere/system/dto/sdk/BasePageRequest.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/dto/sdk/BasePageRequest.java @@ -19,7 +19,7 @@ public class BasePageRequest extends BaseCondition { private int current; @Min(value = 5, message = "每页显示条数必须不小于5") - @Max(value = 100, message = "每页显示条数不能大于100") + @Max(value = 500, message = "每页显示条数不能大于500") @Schema(description = "每页显示条数") private int pageSize; diff --git a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/OrganizationProjectControllerTests.java b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/OrganizationProjectControllerTests.java index c86dc7e9a9..e008780261 100644 --- a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/OrganizationProjectControllerTests.java +++ b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/OrganizationProjectControllerTests.java @@ -540,10 +540,10 @@ public class OrganizationProjectControllerTests extends BaseTest { projectRequest.setCurrent(1); projectRequest.setOrganizationId("organizationId"); this.requestPost(getProjectList, projectRequest, BAD_REQUEST_MATCHER); - //当前页数大于100 + //当前页数大于500 projectRequest = new OrganizationProjectRequest(); projectRequest.setCurrent(1); - projectRequest.setPageSize(101); + projectRequest.setPageSize(501); projectRequest.setOrganizationId("organizationId"); this.requestPost(getProjectList, projectRequest, BAD_REQUEST_MATCHER); //排序字段不合法 @@ -810,10 +810,10 @@ public class OrganizationProjectControllerTests extends BaseTest { memberRequest = new ProjectMemberRequest(); memberRequest.setCurrent(1); this.requestPost(getProjectMemberList, memberRequest, BAD_REQUEST_MATCHER); - //当前页数大于100 + //当前页数大于500 memberRequest = new ProjectMemberRequest(); memberRequest.setCurrent(1); - memberRequest.setPageSize(101); + memberRequest.setPageSize(501); this.requestPost(getProjectMemberList, memberRequest, BAD_REQUEST_MATCHER); //项目Id为空 memberRequest = new ProjectMemberRequest(); diff --git a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/SystemProjectControllerTests.java b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/SystemProjectControllerTests.java index 0a96166d4a..28dda31aa5 100644 --- a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/SystemProjectControllerTests.java +++ b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/SystemProjectControllerTests.java @@ -743,10 +743,10 @@ public class SystemProjectControllerTests extends BaseTest { projectRequest = new ProjectRequest(); projectRequest.setCurrent(1); this.requestPost(getProjectList, projectRequest, BAD_REQUEST_MATCHER); - //当前页数大于100 + //当前页数大于500 projectRequest = new ProjectRequest(); projectRequest.setCurrent(1); - projectRequest.setPageSize(101); + projectRequest.setPageSize(501); this.requestPost(getProjectList, projectRequest, BAD_REQUEST_MATCHER); //排序字段不合法 projectRequest = new ProjectRequest(); @@ -978,10 +978,10 @@ public class SystemProjectControllerTests extends BaseTest { memberRequest = new ProjectMemberRequest(); memberRequest.setCurrent(1); this.requestPost(getProjectMemberList, memberRequest, BAD_REQUEST_MATCHER); - //当前页数大于100 + //当前页数大于501 memberRequest = new ProjectMemberRequest(); memberRequest.setCurrent(1); - memberRequest.setPageSize(101); + memberRequest.setPageSize(501); this.requestPost(getProjectMemberList, memberRequest, BAD_REQUEST_MATCHER); //项目Id为空 memberRequest = new ProjectMemberRequest(); diff --git a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/param/BasePageRequestDefinition.java b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/param/BasePageRequestDefinition.java index 39f6e9a3b9..2e9850dbd5 100644 --- a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/param/BasePageRequestDefinition.java +++ b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/param/BasePageRequestDefinition.java @@ -19,7 +19,7 @@ public class BasePageRequestDefinition { private int current; @Min(value = 5) - @Max(value = 100) + @Max(value = 500) private int pageSize; private Map<@Valid @Pattern(regexp = "^[A-Za-z]+$") String, @Valid @NotBlank String> sort; diff --git a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/user/UserControllerTests.java b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/user/UserControllerTests.java index a7419de852..eebdefbf20 100644 --- a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/user/UserControllerTests.java +++ b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/user/UserControllerTests.java @@ -309,9 +309,9 @@ public class UserControllerTests extends BaseTest { BasePageRequest basePageRequest = new BasePageRequest(); basePageRequest.setPageSize(5); this.requestPost(UserRequestUtils.URL_USER_PAGE, basePageRequest, BAD_REQUEST_MATCHER); - //pageSize超过100 + //pageSize超过501 basePageRequest = UserParamUtils.getDefaultPageRequest(); - basePageRequest.setPageSize(250); + basePageRequest.setPageSize(501); this.requestPost(UserRequestUtils.URL_USER_PAGE, basePageRequest, BAD_REQUEST_MATCHER); //当前页数不大于5 basePageRequest = new BasePageRequest();