|
|
@@ -2,10 +2,6 @@ package com.template.model.query;
|
|
|
|
|
|
import io.swagger.annotations.ApiModelProperty;
|
|
|
import lombok.Data;
|
|
|
-import org.hibernate.validator.constraints.Range;
|
|
|
-
|
|
|
-import javax.validation.constraints.Min;
|
|
|
-import javax.validation.constraints.NotNull;
|
|
|
|
|
|
/**
|
|
|
* 分页查询
|
|
|
@@ -14,15 +10,11 @@ import javax.validation.constraints.NotNull;
|
|
|
*/
|
|
|
@Data
|
|
|
public class PageQuery {
|
|
|
- @NotNull(message = "页码不能为空")
|
|
|
- @Min(value = 1, message = "页码最小值为 1")
|
|
|
@ApiModelProperty(value = "当前页码", required = true)
|
|
|
- Integer page;
|
|
|
+ Integer page = 1;
|
|
|
|
|
|
- @NotNull(message = "每页条数不能为空")
|
|
|
- @Range(min = 1, max = 1000, message = "每页条数,取值范围 1-1000")
|
|
|
@ApiModelProperty(value = "每页条数", required = true)
|
|
|
- Integer limit;
|
|
|
+ Integer limit = 10;
|
|
|
|
|
|
@ApiModelProperty(value = "排序字段")
|
|
|
String order;
|