@Override
public Pagination findPagination(Map<String, Object> queryMap,
int currentPage, int pageSize)
{
MenuCriteria menuCriteria = new MenuCriteria();
// 设置分页参数
menuCriteria.setPageSize(pageSize);
menuCriteria.setStartIndex((currentPage - 1) * pageSize);
List<Menu> items = menuMapper.selectByCriteria(menuCriteria);
int totalCount = (int) menuMapper.selectCountByCriteria(menuCriteria);
return new Pagination(pageSize, currentPage, totalCount, items);
}