基本思路后台从数据库查询出想要的属性存储,前台调用显示
1.实体类
import java.io.Serializable;
import java.util.List;
public class PageBean<T> implements Serializable{
/**分页实体类
* 当前页
* 每页显示条数
*列表数据
*总页数
*总记录数
*/
private Integer currentPage;
private Integer pageSize;
private List<T> list;
private Integer totalPage;
private Integer totalCount;
public PageBean() {
super();
// TODO Auto-generated constructor stub
}
public PageBean(Integer currentPage, Integer pageSize, List<T> list, Integer totalPage, Integer totalCount) {
super();
this.currentPage = currentPage;
this.pageSize = pageSize;
this.list = list;
this.totalPage = totalPage;
this.totalCount = totalCount;
}
public PageBean(Integer currentPage, Integer pageSize, List<T> list, Integer totalCount) {
this.currentPage = currentPage;
this.pageSize = pageSize;
this.list = list;
this