package cg.student.bean;
public class PageBean {
private int all;//总记录数
private int pageCount=3;//每页显示的记录数
private int curPage=1;//当前页
private int pageTotal;//总页数
private int start;//当前页开始记录的位置
private int end;//当前页结束记录的位置
private int pre;//上一页
private int next;//下一页
public PageBean(int all,int pageCount,int curPage) {
this.all=all;
this.pageCount=pageCount;
this.curPage=curPage;
this.pageTotal=(all%pageCount==0)?all/pageCount:(all/pageCount+1);
this.start=(curPage-1)*pageCount;
this.end=curPage*pageCount<all?curPage*pageCount:all;
this.pre=curPage-1>0?curPage-1:1;
this.next=curPage+1<pageTotal?curPage+1:pageTotal;
}
public int getAll() {
return all;
}
public void setAll(int all) {
this.all = all;
}
public int getPageCount() {
return pageCount;
}
public void setPageCount(int pageCount) {
this.pageCount = pageCount;
}
public int getCurPage() {
return curPage;
}
public void setCurPage(int curPage) {
this.curPage = curPage;
}
public int getPageTotal() {
return pageTotal;
}
public void setPageTotal(int pageTotal) {
this.pageTotal = pageTotal;
}
public int getStart() {
return start;
}
public void setStart(int start) {
this.start = start;
}
public int getEnd() {
return end;
}
public void setEnd(int end) {
this.end = end;
}
public int getPre() {
return pre;
}
public void setPre(int pre) {
this.pre = pre;
}
public int getNext() {
return next;
}
public void setNext(int next) {
this.next = next;
}
}
最近下载更多
ma406805131 LV19
2024年12月26日
微信网友_7289626841501696 LV4
2024年12月24日
时光海 LV2
2024年6月29日
TY0165 LV20
2024年6月25日
wefgweds LV1
2024年5月15日
微信网友_6829521472425984 LV5
2024年1月20日
li951753 LV2
2023年6月19日
tmf852 LV5
2023年6月18日
adap12345 LV5
2023年6月16日
微信网友_6184005683466240 LV11
2023年6月10日

最近浏览