service层封装
public PageResBo selectHouses(Mapparams, int pageNo, Integer pageSize) { Pagination page = new Pagination<>(); page.setParams(params); page.setPageNo(pageNo); page.setPageSize(pageSize); List
controller层封装:
@RequestMapping(value = "/querySecondHandHouse") @ResponseBody public Object querySecondHouseHouse(Integer type,PageFrom pageFrom) { Mapparams = new HashMap (); params.put("type", type); PageResBo result = houseService.selectHouses(params, pageFrom.getPageNo()+1, pageFrom.getPageSize()); return result; }