From 07dda8f5d6315e5c373ac04ee32a97ea61f941d1 Mon Sep 17 00:00:00 2001 From: RuoYi <yzz_ivy@163.com> Date: 星期一, 12 九月 2022 17:12:46 +0800 Subject: [PATCH] add isError and isSuccess method --- src/main/java/com/ruoyi/framework/web/controller/BaseController.java | 19 ++++++++++--------- 1 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/main/java/com/ruoyi/framework/web/controller/BaseController.java b/src/main/java/com/ruoyi/framework/web/controller/BaseController.java index 27baf0e..5b8fabc 100644 --- a/src/main/java/com/ruoyi/framework/web/controller/BaseController.java +++ b/src/main/java/com/ruoyi/framework/web/controller/BaseController.java @@ -11,6 +11,7 @@ import com.github.pagehelper.PageInfo; import com.ruoyi.common.constant.HttpStatus; import com.ruoyi.common.utils.DateUtils; +import com.ruoyi.common.utils.PageUtils; import com.ruoyi.common.utils.SecurityUtils; import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.sql.SqlUtil; @@ -51,15 +52,7 @@ */ protected void startPage() { - PageDomain pageDomain = TableSupport.buildPageRequest(); - Integer pageNum = pageDomain.getPageNum(); - Integer pageSize = pageDomain.getPageSize(); - if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize)) - { - String orderBy = SqlUtil.escapeOrderBySql(pageDomain.getOrderBy()); - Boolean reasonable = pageDomain.getReasonable(); - PageHelper.startPage(pageNum, pageSize, orderBy).setReasonable(reasonable); - } + PageUtils.startPage(); } /** @@ -76,6 +69,14 @@ } /** + * 娓呯悊鍒嗛〉鐨勭嚎绋嬪彉閲� + */ + protected void clearPage() + { + PageUtils.clearPage(); + } + + /** * 鍝嶅簲璇锋眰鍒嗛〉鏁版嵁 */ @SuppressWarnings({ "rawtypes", "unchecked" }) -- Gitblit v1.9.3