package com.pojo; public class Page implements java.io.Serializable { /** * */ private static final long serialVersionUID = -777376066677154821L; private int pagesize;//单页记录 private int currentpage = 1;//当前页面 private int countdate;//总记录数 private int lastPage;//上一页 private int nextPage;//下一页 private int countPage; public int getCurrentpage() { return currentpage; } public void setCurrentpage(int currentpage) { if(currentpage>getCountpage()) { this.currentpage = getCountpage(); }else { if(currentpage < 1) { this.currentpage = 1; } else { this.currentpage = currentpage; } } } public int getPagesize() { return pagesize; } public void setPagesize(int pagesize) { this.pagesize = pagesize; } public int getCountdate() { return countdate; } public void setCountdate(int countdate) { this.countdate = countdate; } //由记录数设定有关的页面数。 public int getCountpage() { int i = this.countdate / this.pagesize; if((this.countdate % this.pagesize)!=0) { i+=1; } System.out.println("总页数:"+i); return i; } public int getLastPage() { return this.getCurrentpage()-1; } public int getNextPage() { return this.getCurrentpage()+1; } //给ibatis用数据 public int getCurrent() { return (this.currentpage-1)*pagesize; } public int getNext() { return this.currentpage*pagesize; } public int getCountPage() { return countPage; } public void setCountPage(int countPage) { this.countPage = countPage; } public void setLastPage(int lastPage) { this.lastPage = lastPage; } public void setNextPage(int nextPage) { this.nextPage = nextPage; } }

HTMLProject LV1
2022年7月6日
laoKlaok LV1
2021年7月16日
艾伯特 LV2
2021年3月11日
lovemyhome LV5
2021年1月2日
freedom2017 LV14
2020年4月14日
青蛙煮水 LV1
2019年4月11日
zhai040827 LV1
2019年3月5日
爱的光荣是 LV2
2019年1月25日
msl1134 LV3
2018年11月23日
kynasln LV5
2018年11月19日