public Page PageAfter(PageModel page, PeopleQuery query) {List list = service.PageAfter(page.getP(),page.getPs(),query);List people = (List) list.get(0); //数据集合Integer total = ((List) list.get(1)).get(0); //总量Page page1 = new Page();page1.setTotal(total);page1.setRecords(people);page1.setCurrent(page.getP());page1.setSearchCount(true);page1.setSize(page.getPs());page1.setPages(total/page1.getSize());return page1;}
四、service层:
public List PageAfter(long p, long ps, PeopleQuery query) {return peopleMapper.PageAfter(p,ps,query); }
五、mapper层:
List PageAfter(@Param("p") Long p,@Param("ps") Long ps, @Param("query") PeopleQuery query);