32 lines
988 B
Java
32 lines
988 B
Java
package com.whdc.model.dto;
|
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
import io.swagger.annotations.ApiModelProperty;
|
|
import lombok.Data;
|
|
|
|
import javax.validation.constraints.Pattern;
|
|
|
|
@Data
|
|
public class FindPageDto {
|
|
|
|
@ApiModelProperty(value = "当前页", example = "1")
|
|
private Integer pageNumber = 1;
|
|
|
|
@ApiModelProperty(value = "每页条数", example = "10")
|
|
private Integer pageSize = 10;
|
|
|
|
@ApiModelProperty(value = "是否统计总数。数据量大时,为了提高查询效率,可以将该字段置为 false", example = "10")
|
|
private Boolean searchCount = true;
|
|
|
|
@ApiModelProperty(value = "排序字段")
|
|
private String sortField;
|
|
|
|
@ApiModelProperty(value = "排序顺序", example = "asc")
|
|
@Pattern(message = "排序顺序,仅支持 asc 或者 desc", regexp = "asc|desc")
|
|
private String sortOrder = "asc";
|
|
|
|
public Page getPage() {
|
|
return new Page(pageNumber, pageSize, searchCount);
|
|
}
|
|
}
|