package com.fzzy.igds.dzhwk.data; import java.util.Collections; import java.util.List; /** * 根据需要重写封装系统使用的Page对象,主要是为了满足LayUI前端的使用 * * @author Andy */ public class Page extends com.baomidou.mybatisplus.extension.plugins.pagination.Page { /** * */ private static final long serialVersionUID = 1L; private List data = Collections.emptyList();// LAYUI中使用的数据信息 private String code = "0";// LAYUI 中的定义 private String msg;// LAYUI使用的提示信息 private int count;// LAYUI使用的总数 private int limit;// 每页显示的条数。laypage将会借助 count 和 limit 计算出分页数 private int curr;// 起始页。一般用于刷新类型的跳页以及HASH跳页 public int getLimit() { Long size1 = super.getSize(); limit = size1.intValue(); return limit; } public void setLimit(int limit) { this.limit = limit; this.setSize(limit); } public int getCurr() { Long size1 = super.getCurrent(); curr = size1.intValue(); return curr; } public void setCurr(int curr) { this.curr = curr; super.setCurrent(curr); } public List getData() { data = super.getRecords(); return data; } public void setData(List data) { this.data = data; super.setRecords(data); } public String getCode() { return code; } public void setCode(String code) { this.code = code; } public String getMsg() { return msg; } public void setMsg(String msg) { this.msg = msg; } public int getCount() { Long size1 = super.getTotal(); count = size1.intValue(); return count; } public void setCount(int count) { this.count = count; super.setTotal(count); } public Page() { } public Page(int current, int size) { super(current, size); } }