| | |
| | | public static final String PAGE_NUM = "pageNum"; |
| | | |
| | | /** |
| | | * 当前记录起始索引(兼容pageCurr参数) |
| | | */ |
| | | public static final String PAGE_CURR = "pageCurr"; |
| | | |
| | | /** |
| | | * 每页显示记录数 |
| | | */ |
| | | public static final String PAGE_SIZE = "pageSize"; |
| | |
| | | public static PageDomain getPageDomain() |
| | | { |
| | | PageDomain pageDomain = new PageDomain(); |
| | | pageDomain.setPageNum(Convert.toInt(ServletUtils.getParameter(PAGE_NUM), 1)); |
| | | // 优先使用pageNum,如果没有则使用pageCurr(兼容前端) |
| | | String pageNumStr = ServletUtils.getParameter(PAGE_NUM); |
| | | if (pageNumStr == null || pageNumStr.isEmpty()) { |
| | | pageNumStr = ServletUtils.getParameter(PAGE_CURR); |
| | | } |
| | | pageDomain.setPageNum(Convert.toInt(pageNumStr, 1)); |
| | | pageDomain.setPageSize(Convert.toInt(ServletUtils.getParameter(PAGE_SIZE), 10)); |
| | | pageDomain.setOrderByColumn(ServletUtils.getParameter(ORDER_BY_COLUMN)); |
| | | pageDomain.setIsAsc(ServletUtils.getParameter(IS_ASC)); |