说明:只查询分页数据,而分页相关信息没有
public List<Count> getAllCount(int pageNo, int pageSize) { PageHelper.startPage(pageNo, pageSize); return countMapper.getAllCount(); }返回值:
[{ "id": 1, "cnt": 11 }, { "id": 2, "cnt": 12 }, { "id": 3, "cnt": 13 }, { "id": 4, "cnt": 14 }, { "id": 5, "cnt": 15 }, { "id": 6, "cnt": 16 }, { "id": 7, "cnt": 17 }, { "id": 8, "cnt": 18 }, { "id": 9, "cnt": 19 }, { "id": 10, "cnt": 10 }]返回值:
{ "total": 15, "list": [{ "id": 1, "cnt": 11 }, { "id": 2, "cnt": 12 }, { "id": 3, "cnt": 13 }, { "id": 4, "cnt": 14 }, { "id": 5, "cnt": 15 }, { "id": 6, "cnt": 16 }, { "id": 7, "cnt": 17 }, { "id": 8, "cnt": 18 }, { "id": 9, "cnt": 19 }, { "id": 10, "cnt": 10 }], "pageNum": 1, "pageSize": 10, "size": 10, "startRow": 1, "endRow": 10, "pages": 2, "prePage": 0, "nextPage": 2, "isFirstPage": true, "isLastPage": false, "hasPreviousPage": false, "hasNextPage": true, "navigatePages": 8, "navigatepageNums": [1,2], "navigateFirstPage": 1, "navigateLastPage": 2 }