All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.lx.entity.PageResult Maven / Gradle / Ivy

Go to download

使用文档: https://a7fi97h1rc.feishu.cn/docx/X3LRdtLhkoXQ8hxgXDQc2CLOnEg?from=from_copylink

There is a newer version: 1.1
Show newest version
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