Просмотр исходного кода

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

RuoYi лет назад: 4
Родитель
Сommit
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
27
             PageHelper.startPage(pageNum, pageSize, orderBy).setReasonable(reasonable);
27
             PageHelper.startPage(pageNum, pageSize, orderBy).setReasonable(reasonable);
28
         }
28
         }
29
     }
29
     }
30
+
31
+    /**
32
+     * 清理分页的线程变量
33
+     */
34
+    public static void clearPage()
35
+    {
36
+        PageHelper.clearPage();
37
+    }
30
 }
38
 }

+ 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
49
     }
49
     }
50
 
50
 
51
     /**
51
     /**
52
+     * 清理分页的线程变量
53
+     */
54
+    protected void clearPage()
55
+    {
56
+        PageUtils.clearPage();
57
+    }
58
+
59
+    /**
52
      * 响应请求分页数据
60
      * 响应请求分页数据
53
      */
61
      */
54
     @SuppressWarnings({ "rawtypes", "unchecked" })
62
     @SuppressWarnings({ "rawtypes", "unchecked" })