package cn.demo.utils;
public class Page {
private Integer currPage=1; //当前页
private Integer pageSize; //页面大小
private Integer totalCount; //总记录数
private Integer pageCount; //总页数
public Integer getCurrPage() {
return currPage;
}
public void setCurrPage(Integer currPage) {
if (currPage==null) {
currPage=1;
}else if (currPage>pageCount) {
currPage=pageCount;
}else if (currPage<1) {
currPage=1;
}
this.currPage = currPage;
}
public Integer getPageSize() {
return pageSize;
}
public void setPageSize(Integer pageSize) {
if (pageSize>0) {
this.pageSize = pageSize;
}
}
public Integer getTotalCount() {
return totalCount;
}
public void setTotalCount(Integer totalCount) {
this.totalCount = totalCount;
this.setPageCount(totalCount);
}
public Integer getPageCount() {
return pageCount;
}
public void setPageCount(Integer totalCount) {
if (totalCount>0) {
this.pageCount = totalCount%pageSize==0?totalCount/pageSize:totalCount/pageSize+1;
}
}
}
我怀疑是pageBean的问题?
之前pageBean有对象吗,如果一直公用一个对象,应该提前new一个全局的