码迷,mamicode.com
首页 > 其他好文 > 详细

通用分页的编写

时间:2019-01-30 22:17:17      阅读:149      评论:0      收藏:0      [点我收藏+]

标签:array   color   list   总数   style   span   ceil   private   bsp   

1、分页是在dao层封装好的

2、分页的参数:

  currentPage:当前页数

  pageSize:每页的数量

  totalPage:总页数  Math.ceil(totalCount/pageSize)

  totalCount:总数量

  封装好的集合 List<T> list ;

 

1 public class Page<T> {
2     private Integer currentPage;//当前页
3     private Integer pageSize;//每页数量
4     private Integer totalPage;//总页数
5     private Long totalCount;//总数量
6     private List<T> list = new ArrayList<T>();
7 }

 

通用分页的编写

标签:array   color   list   总数   style   span   ceil   private   bsp   

原文地址:https://www.cnblogs.com/zzzyiren/p/10339956.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!