public class PageResult implements Serializable { private Long total;//总记录数 private List rows;//当前页面结果 public Long getTotal() { return total; } public void setTotal(Long total) { this.total = total; } public List getRows() { return rows; } public void setRows(List rows) { this.rows = rows; } public PageResult(Long total, List rows) { this.total = total; this.rows = rows; } public PageResult() { } }
该工具类是用于返回的是分页效果。须要返回PageResult类型。app
@RequestMapper("..") public PageResult add(){ return service.add(); }