refactor(系统设置): 修改后台分页最大限制条数
This commit is contained in:
parent
74026933e4
commit
faafea471f
|
@ -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;
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue