PageInfo一个方法返回数据和分页信息

PageHelper.startPage(criteria.getStartIndex() , criteria.getPageSize());
List<Article> articles = articleMapper.queryAll(criteria);
PageInfo<Article> pageInfo = new PageInfo<>(articles);
System.out.println("total = " + pageInfo.getTotal());
System.out.println("PageNum = " + pageInfo.getPageNum());
return articles;

上一篇:MongoDB模糊查询时带有括号的情况


下一篇:测试术语3