浏览代码

新增清理分页的线程变量方法

RuoYi 3 年之前
父节点
当前提交
5d44d2b5a6

+ 8 - 0
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);
             PageHelper.startPage(pageNum, pageSize, orderBy).setReasonable(reasonable);
         }
         }
     }
     }
+
+    /**
+     * 清理分页的线程变量
+     */
+    public static void clearPage()
+    {
+        PageHelper.clearPage();
+    }
 }
 }

+ 8 - 0
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" })
     @SuppressWarnings({ "rawtypes", "unchecked" })