cn.easyutil.project.base.dto.PageDto Maven / Gradle / Ivy
package cn.easyutil.project.base.dto;
import cn.easyutil.project.base.bean.BaseBean;
import cn.easyutil.project.base.bean.Page;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@ApiModel("分页查询入参参数")
public class PageDto extends BaseBean {
@ApiModelProperty(value = "每页显示数量 默认5",example="5")
private Integer showCount = 5; // 每页显示记录数
@ApiModelProperty(value = "当前页",example="1")
private Integer currentPage = 1; // 当前页
/**
* 转换为可直接使用的page
* @return
*/
public Page parseToPage(){
Page page = new Page();
page.setCurrentPage(this.currentPage);
page.setShowCount(this.showCount);
return page;
}
public Integer getShowCount() {
return showCount;
}
public void setShowCount(Integer showCount) {
this.showCount = showCount;
}
public Integer getCurrentPage() {
return currentPage;
}
public void setCurrentPage(Integer currentPage) {
this.currentPage = currentPage;
}
}