refactor(系统设置): 修改后台分页最大限制条数

This commit is contained in:
song-tianyang 2023-12-20 14:41:37 +08:00 committed by 刘瑞斌
parent 74026933e4
commit faafea471f
5 changed files with 12 additions and 12 deletions

View File

@ -19,7 +19,7 @@ public class BasePageRequest extends BaseCondition {
private int current; private int current;
@Min(value = 5, message = "每页显示条数必须不小于5") @Min(value = 5, message = "每页显示条数必须不小于5")
@Max(value = 100, message = "每页显示条数不能大于100") @Max(value = 500, message = "每页显示条数不能大于500")
@Schema(description = "每页显示条数") @Schema(description = "每页显示条数")
private int pageSize; private int pageSize;

View File

@ -540,10 +540,10 @@ public class OrganizationProjectControllerTests extends BaseTest {
projectRequest.setCurrent(1); projectRequest.setCurrent(1);
projectRequest.setOrganizationId("organizationId"); projectRequest.setOrganizationId("organizationId");
this.requestPost(getProjectList, projectRequest, BAD_REQUEST_MATCHER); this.requestPost(getProjectList, projectRequest, BAD_REQUEST_MATCHER);
//当前页数大于100 //当前页数大于500
projectRequest = new OrganizationProjectRequest(); projectRequest = new OrganizationProjectRequest();
projectRequest.setCurrent(1); projectRequest.setCurrent(1);
projectRequest.setPageSize(101); projectRequest.setPageSize(501);
projectRequest.setOrganizationId("organizationId"); projectRequest.setOrganizationId("organizationId");
this.requestPost(getProjectList, projectRequest, BAD_REQUEST_MATCHER); this.requestPost(getProjectList, projectRequest, BAD_REQUEST_MATCHER);
//排序字段不合法 //排序字段不合法
@ -810,10 +810,10 @@ public class OrganizationProjectControllerTests extends BaseTest {
memberRequest = new ProjectMemberRequest(); memberRequest = new ProjectMemberRequest();
memberRequest.setCurrent(1); memberRequest.setCurrent(1);
this.requestPost(getProjectMemberList, memberRequest, BAD_REQUEST_MATCHER); this.requestPost(getProjectMemberList, memberRequest, BAD_REQUEST_MATCHER);
//当前页数大于100 //当前页数大于500
memberRequest = new ProjectMemberRequest(); memberRequest = new ProjectMemberRequest();
memberRequest.setCurrent(1); memberRequest.setCurrent(1);
memberRequest.setPageSize(101); memberRequest.setPageSize(501);
this.requestPost(getProjectMemberList, memberRequest, BAD_REQUEST_MATCHER); this.requestPost(getProjectMemberList, memberRequest, BAD_REQUEST_MATCHER);
//项目Id为空 //项目Id为空
memberRequest = new ProjectMemberRequest(); memberRequest = new ProjectMemberRequest();

View File

@ -743,10 +743,10 @@ public class SystemProjectControllerTests extends BaseTest {
projectRequest = new ProjectRequest(); projectRequest = new ProjectRequest();
projectRequest.setCurrent(1); projectRequest.setCurrent(1);
this.requestPost(getProjectList, projectRequest, BAD_REQUEST_MATCHER); this.requestPost(getProjectList, projectRequest, BAD_REQUEST_MATCHER);
//当前页数大于100 //当前页数大于500
projectRequest = new ProjectRequest(); projectRequest = new ProjectRequest();
projectRequest.setCurrent(1); projectRequest.setCurrent(1);
projectRequest.setPageSize(101); projectRequest.setPageSize(501);
this.requestPost(getProjectList, projectRequest, BAD_REQUEST_MATCHER); this.requestPost(getProjectList, projectRequest, BAD_REQUEST_MATCHER);
//排序字段不合法 //排序字段不合法
projectRequest = new ProjectRequest(); projectRequest = new ProjectRequest();
@ -978,10 +978,10 @@ public class SystemProjectControllerTests extends BaseTest {
memberRequest = new ProjectMemberRequest(); memberRequest = new ProjectMemberRequest();
memberRequest.setCurrent(1); memberRequest.setCurrent(1);
this.requestPost(getProjectMemberList, memberRequest, BAD_REQUEST_MATCHER); this.requestPost(getProjectMemberList, memberRequest, BAD_REQUEST_MATCHER);
//当前页数大于100 //当前页数大于501
memberRequest = new ProjectMemberRequest(); memberRequest = new ProjectMemberRequest();
memberRequest.setCurrent(1); memberRequest.setCurrent(1);
memberRequest.setPageSize(101); memberRequest.setPageSize(501);
this.requestPost(getProjectMemberList, memberRequest, BAD_REQUEST_MATCHER); this.requestPost(getProjectMemberList, memberRequest, BAD_REQUEST_MATCHER);
//项目Id为空 //项目Id为空
memberRequest = new ProjectMemberRequest(); memberRequest = new ProjectMemberRequest();

View File

@ -19,7 +19,7 @@ public class BasePageRequestDefinition {
private int current; private int current;
@Min(value = 5) @Min(value = 5)
@Max(value = 100) @Max(value = 500)
private int pageSize; private int pageSize;
private Map<@Valid @Pattern(regexp = "^[A-Za-z]+$") String, @Valid @NotBlank String> sort; private Map<@Valid @Pattern(regexp = "^[A-Za-z]+$") String, @Valid @NotBlank String> sort;

View File

@ -309,9 +309,9 @@ public class UserControllerTests extends BaseTest {
BasePageRequest basePageRequest = new BasePageRequest(); BasePageRequest basePageRequest = new BasePageRequest();
basePageRequest.setPageSize(5); basePageRequest.setPageSize(5);
this.requestPost(UserRequestUtils.URL_USER_PAGE, basePageRequest, BAD_REQUEST_MATCHER); this.requestPost(UserRequestUtils.URL_USER_PAGE, basePageRequest, BAD_REQUEST_MATCHER);
//pageSize超过100 //pageSize超过501
basePageRequest = UserParamUtils.getDefaultPageRequest(); basePageRequest = UserParamUtils.getDefaultPageRequest();
basePageRequest.setPageSize(250); basePageRequest.setPageSize(501);
this.requestPost(UserRequestUtils.URL_USER_PAGE, basePageRequest, BAD_REQUEST_MATCHER); this.requestPost(UserRequestUtils.URL_USER_PAGE, basePageRequest, BAD_REQUEST_MATCHER);
//当前页数不大于5 //当前页数不大于5
basePageRequest = new BasePageRequest(); basePageRequest = new BasePageRequest();