com.lx.entity.PageResult Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of lxboot3 Show documentation
Show all versions of lxboot3 Show documentation
使用文档: https://a7fi97h1rc.feishu.cn/docx/X3LRdtLhkoXQ8hxgXDQc2CLOnEg?from=from_copylink
package com.lx.entity;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.v3.oas.annotations.media.Schema;
import java.util.List;
@Schema(name = "分页工具类")
public class PageResult {
@Schema(description = "总条数")
private Long total;
@Schema(description = "返回的数据")
private List rows;
@Schema(description = "第几页",required = true)
private Long page;
@Schema(description = "查询条数",required = true)
private Long limit;
public PageResult() {}
public PageResult(Page page) {
this(page.getTotal(), page.getRecords(), page.getPages(), page.getSize());
}
public PageResult(Long total, List rows, Long page, Long limit) {
this.total = total;
this.rows = rows;
this.page = page;
this.limit = limit;
}
public PageResult(Long page, Long limit) {
this.page = page;
this.limit = limit;
}
public Long getPage() {
return page;
}
public void setPage(Long page) {
this.page = page;
}
public Long getLimit() {
return limit;
}
public void setLimit(Long limit) {
this.limit = limit;
}
public Long getTotal() {
return total;
}
public void setTotal(Long total) {
this.total = total;
}
public List getRows() {
return rows;
}
public void setRows(List rows) {
this.rows = rows;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy