¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.common.core.page; |
| | | |
| | | import com.ruoyi.common.utils.ServletUtils; |
| | | |
| | | /** |
| | | * è¡¨æ ¼æ°æ®å¤ç |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | public class TableSupport |
| | | { |
| | | /** |
| | | * å½åè®°å½èµ·å§ç´¢å¼ |
| | | */ |
| | | public static final String PAGE_NUM = "pageNum"; |
| | | |
| | | /** |
| | | * æ¯é¡µæ¾ç¤ºè®°å½æ° |
| | | */ |
| | | public static final String PAGE_SIZE = "pageSize"; |
| | | |
| | | /** |
| | | * æåºå |
| | | */ |
| | | public static final String ORDER_BY_COLUMN = "orderByColumn"; |
| | | |
| | | /** |
| | | * æåºçæ¹å "desc" æè
"asc". |
| | | */ |
| | | public static final String IS_ASC = "isAsc"; |
| | | |
| | | /** |
| | | * å°è£
å页对象 |
| | | */ |
| | | public static PageDomain getPageDomain() |
| | | { |
| | | PageDomain pageDomain = new PageDomain(); |
| | | pageDomain.setPageNum(ServletUtils.getParameterToInt(PAGE_NUM)); |
| | | pageDomain.setPageSize(ServletUtils.getParameterToInt(PAGE_SIZE)); |
| | | pageDomain.setOrderByColumn(ServletUtils.getParameter(ORDER_BY_COLUMN)); |
| | | pageDomain.setIsAsc(ServletUtils.getParameter(IS_ASC)); |
| | | return pageDomain; |
| | | } |
| | | |
| | | public static PageDomain buildPageRequest() |
| | | { |
| | | return getPageDomain(); |
| | | } |
| | | } |