From a1cf719d268a9d16db81ece94e75037c844f898f Mon Sep 17 00:00:00 2001 From: 疯狂的狮子li <15040126243@163.com> Date: 星期二, 18 二月 2020 14:47:23 +0800 Subject: [PATCH] Merge branch 'master' of https://gitee.com/y_project/RuoYi-Vue --- ruoyi/src/main/java/com/ruoyi/framework/web/page/TableSupport.java | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 49 insertions(+), 0 deletions(-) diff --git a/ruoyi/src/main/java/com/ruoyi/framework/web/page/TableSupport.java b/ruoyi/src/main/java/com/ruoyi/framework/web/page/TableSupport.java new file mode 100644 index 0000000..156417a --- /dev/null +++ b/ruoyi/src/main/java/com/ruoyi/framework/web/page/TableSupport.java @@ -0,0 +1,49 @@ +package com.ruoyi.framework.web.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(); + } +} -- Gitblit v1.9.3