From 5d44d2b5a6a548225bb54bc50ca4544824ff12f7 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Thu, 31 Mar 2022 11:58:23 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=B8=85=E7=90=86=E5=88=86?= =?UTF-8?q?=E9=A1=B5=E7=9A=84=E7=BA=BF=E7=A8=8B=E5=8F=98=E9=87=8F=E6=96=B9?= =?UTF-8?q?=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/ruoyi/common/core/utils/PageUtils.java | 8 ++++++++ .../java/com/ruoyi/common/core/web/controller/BaseController.java | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/PageUtils.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/PageUtils.java index 59ad324..66bc99e 100644 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/PageUtils.java +++ b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/PageUtils.java @@ -27,4 +27,12 @@ public class PageUtils extends PageHelper PageHelper.startPage(pageNum, pageSize, orderBy).setReasonable(reasonable); } } + + /** + * 清理分页的线程变量 + */ + public static void clearPage() + { + PageHelper.clearPage(); + } } diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/web/controller/BaseController.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/web/controller/BaseController.java index af52f17..609238e 100644 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/web/controller/BaseController.java +++ b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/web/controller/BaseController.java @@ -49,6 +49,14 @@ public class BaseController } /** + * 清理分页的线程变量 + */ + protected void clearPage() + { + PageUtils.clearPage(); + } + + /** * 响应请求分页数据 */ @SuppressWarnings({ "rawtypes", "unchecked" })