| | |
| | | package com.ruoyi.framework.web.page;
|
| | |
|
| | | import com.ruoyi.common.core.text.Convert;
|
| | | import com.ruoyi.common.utils.ServletUtils;
|
| | |
|
| | | /**
|
| | |
| | | public static final String IS_ASC = "isAsc";
|
| | |
|
| | | /**
|
| | | * 分页参数合理化
|
| | | */
|
| | | public static final String REASONABLE = "reasonable";
|
| | |
|
| | | /**
|
| | | * 封装分页对象
|
| | | */
|
| | | public static PageDomain getPageDomain()
|
| | | {
|
| | | PageDomain pageDomain = new PageDomain();
|
| | | pageDomain.setPageNum(ServletUtils.getParameterToInt(PAGE_NUM));
|
| | | pageDomain.setPageSize(ServletUtils.getParameterToInt(PAGE_SIZE));
|
| | | pageDomain.setPageNum(Convert.toInt(ServletUtils.getParameter(PAGE_NUM), 1));
|
| | | pageDomain.setPageSize(Convert.toInt(ServletUtils.getParameter(PAGE_SIZE), 10));
|
| | | pageDomain.setOrderByColumn(ServletUtils.getParameter(ORDER_BY_COLUMN));
|
| | | pageDomain.setIsAsc(ServletUtils.getParameter(IS_ASC));
|
| | | pageDomain.setReasonable(ServletUtils.getParameterToBool(REASONABLE));
|
| | | return pageDomain;
|
| | | }
|
| | |
|