From 80784433b8506f58463fc1f4a438c053b61b299e Mon Sep 17 00:00:00 2001
From: 疯狂的狮子li <15040126243@163.com>
Date: 星期四, 02 九月 2021 15:59:42 +0800
Subject: [PATCH] remove 移除分页合理化参数 使用 MP 全局配置分页溢出
---
ruoyi-common/src/main/java/com/ruoyi/common/utils/PageUtils.java | 22 ++++------------------
ruoyi-ui/src/views/system/dict/data.vue | 1 -
ruoyi-ui/src/views/monitor/job/log.vue | 1 -
ruoyi-ui/src/views/tool/gen/index.vue | 1 -
ruoyi-ui/src/views/demo/demo/index.vue | 1 -
ruoyi-ui/src/views/system/role/authUser.vue | 1 -
ruoyi-ui/src/views/system/notice/index.vue | 1 -
ruoyi-ui/src/views/system/role/index.vue | 1 -
ruoyi-generator/src/main/resources/vm/vue/index.vue.vm | 1 -
ruoyi-ui/src/views/system/user/index.vue | 1 -
ruoyi-ui/src/views/monitor/job/index.vue | 1 -
ruoyi-ui/src/views/system/oss/index.vue | 1 -
ruoyi-ui/src/views/system/config/index.vue | 1 -
ruoyi-ui/src/views/system/dict/index.vue | 1 -
ruoyi-ui/src/views/monitor/logininfor/index.vue | 1 -
ruoyi-ui/src/views/system/oss/config.vue | 1 -
ruoyi-ui/src/views/system/post/index.vue | 1 -
17 files changed, 4 insertions(+), 34 deletions(-)
diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/PageUtils.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/PageUtils.java
index 67cf72c..17a12f1 100644
--- a/ruoyi-common/src/main/java/com/ruoyi/common/utils/PageUtils.java
+++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/PageUtils.java
@@ -37,11 +37,6 @@
public static final String IS_ASC = "isAsc";
/**
- * 鍒嗛〉鍙傛暟鍚堢悊鍖�
- */
- private static final String REASONABLE = "reasonable";
-
- /**
* 褰撳墠璁板綍璧峰绱㈠紩 榛樿鍊�
*/
public static final int DEFAULT_PAGE_NUM = 1;
@@ -50,11 +45,6 @@
* 姣忛〉鏄剧ず璁板綍鏁� 榛樿鍊� 榛樿鏌ュ叏閮�
*/
public static final int DEFAULT_PAGE_SIZE = Integer.MAX_VALUE;
-
- /**
- * 鍒嗛〉鍙傛暟鍚堢悊鍖� 榛樿鍊�
- */
- private static final Boolean DEFAULT_REASONABLE = Boolean.TRUE;
/**
* 鏋勫缓 plus 鍒嗛〉瀵硅薄
@@ -67,10 +57,8 @@
Integer pageSize = ServletUtils.getParameterToInt(PAGE_SIZE, DEFAULT_PAGE_SIZE);
String orderByColumn = ServletUtils.getParameter(ORDER_BY_COLUMN);
String isAsc = ServletUtils.getParameter(IS_ASC);
- Boolean reasonable = ServletUtils.getParameterToBool(REASONABLE, DEFAULT_REASONABLE);
- //鍒嗛〉鍚堢悊鍖栵紝閽堝涓嶅悎鐞嗙殑椤电爜鑷姩澶勭悊
- if (reasonable && pageNum <= 0) {
- pageNum = 1;
+ if (pageNum <= 0) {
+ pageNum = DEFAULT_PAGE_NUM;
}
PagePlus<T, K> page = new PagePlus<>(pageNum, pageSize);
if (StringUtils.isNotBlank(orderByColumn)) {
@@ -98,10 +86,8 @@
Integer pageSize = ServletUtils.getParameterToInt(PAGE_SIZE, DEFAULT_PAGE_SIZE);
String orderByColumn = ServletUtils.getParameter(ORDER_BY_COLUMN, defaultOrderByColumn);
String isAsc = ServletUtils.getParameter(IS_ASC, defaultIsAsc);
- Boolean reasonable = ServletUtils.getParameterToBool(REASONABLE, DEFAULT_REASONABLE);
- //鍒嗛〉鍚堢悊鍖栵紝閽堝涓嶅悎鐞嗙殑椤电爜鑷姩澶勭悊
- if (reasonable && pageNum <= 0) {
- pageNum = 1;
+ if (pageNum <= 0) {
+ pageNum = DEFAULT_PAGE_NUM;
}
// 鍏煎鍓嶇鎺掑簭绫诲瀷
if ("ascending".equals(isAsc)) {
diff --git a/ruoyi-generator/src/main/resources/vm/vue/index.vue.vm b/ruoyi-generator/src/main/resources/vm/vue/index.vue.vm
index aec95db..4b055fa 100644
--- a/ruoyi-generator/src/main/resources/vm/vue/index.vue.vm
+++ b/ruoyi-generator/src/main/resources/vm/vue/index.vue.vm
@@ -367,7 +367,6 @@
queryParams: {
pageNum: 1,
pageSize: 10,
- reasonable: true,
#foreach ($column in $columns)
#if($column.query)
$column.javaField: undefined#if($velocityCount != $columns.size()),#end
diff --git a/ruoyi-ui/src/views/demo/demo/index.vue b/ruoyi-ui/src/views/demo/demo/index.vue
index c7f500d..791ab7e 100644
--- a/ruoyi-ui/src/views/demo/demo/index.vue
+++ b/ruoyi-ui/src/views/demo/demo/index.vue
@@ -205,7 +205,6 @@
queryParams: {
pageNum: 1,
pageSize: 10,
- reasonable: true,
testKey: undefined,
value: undefined,
createTime: undefined,
diff --git a/ruoyi-ui/src/views/monitor/job/index.vue b/ruoyi-ui/src/views/monitor/job/index.vue
index f73cfc8..6256804 100644
--- a/ruoyi-ui/src/views/monitor/job/index.vue
+++ b/ruoyi-ui/src/views/monitor/job/index.vue
@@ -320,7 +320,6 @@
queryParams: {
pageNum: 1,
pageSize: 10,
- reasonable: true,
jobName: undefined,
jobGroup: undefined,
status: undefined
diff --git a/ruoyi-ui/src/views/monitor/job/log.vue b/ruoyi-ui/src/views/monitor/job/log.vue
index 561924b..7e4dffe 100644
--- a/ruoyi-ui/src/views/monitor/job/log.vue
+++ b/ruoyi-ui/src/views/monitor/job/log.vue
@@ -220,7 +220,6 @@
queryParams: {
pageNum: 1,
pageSize: 10,
- reasonable: true,
jobName: undefined,
jobGroup: undefined,
status: undefined
diff --git a/ruoyi-ui/src/views/monitor/logininfor/index.vue b/ruoyi-ui/src/views/monitor/logininfor/index.vue
index bba4553..778492b 100644
--- a/ruoyi-ui/src/views/monitor/logininfor/index.vue
+++ b/ruoyi-ui/src/views/monitor/logininfor/index.vue
@@ -153,7 +153,6 @@
queryParams: {
pageNum: 1,
pageSize: 10,
- reasonable: true,
ipaddr: undefined,
userName: undefined,
status: undefined
diff --git a/ruoyi-ui/src/views/system/config/index.vue b/ruoyi-ui/src/views/system/config/index.vue
index 2c69ee4..04384bb 100644
--- a/ruoyi-ui/src/views/system/config/index.vue
+++ b/ruoyi-ui/src/views/system/config/index.vue
@@ -219,7 +219,6 @@
queryParams: {
pageNum: 1,
pageSize: 10,
- reasonable: true,
configName: undefined,
configKey: undefined,
configType: undefined
diff --git a/ruoyi-ui/src/views/system/dict/data.vue b/ruoyi-ui/src/views/system/dict/data.vue
index 1aa61cc..3b8ec4b 100644
--- a/ruoyi-ui/src/views/system/dict/data.vue
+++ b/ruoyi-ui/src/views/system/dict/data.vue
@@ -247,7 +247,6 @@
queryParams: {
pageNum: 1,
pageSize: 10,
- reasonable: true,
dictName: undefined,
dictType: undefined,
status: undefined
diff --git a/ruoyi-ui/src/views/system/dict/index.vue b/ruoyi-ui/src/views/system/dict/index.vue
index 02eabfb..b4ac1da 100644
--- a/ruoyi-ui/src/views/system/dict/index.vue
+++ b/ruoyi-ui/src/views/system/dict/index.vue
@@ -227,7 +227,6 @@
queryParams: {
pageNum: 1,
pageSize: 10,
- reasonable: true,
dictName: undefined,
dictType: undefined,
status: undefined
diff --git a/ruoyi-ui/src/views/system/notice/index.vue b/ruoyi-ui/src/views/system/notice/index.vue
index f2ae9bb..b90168c 100644
--- a/ruoyi-ui/src/views/system/notice/index.vue
+++ b/ruoyi-ui/src/views/system/notice/index.vue
@@ -204,7 +204,6 @@
queryParams: {
pageNum: 1,
pageSize: 10,
- reasonable: true,
noticeTitle: undefined,
createBy: undefined,
status: undefined
diff --git a/ruoyi-ui/src/views/system/oss/config.vue b/ruoyi-ui/src/views/system/oss/config.vue
index c87ef92..28bdbe5 100644
--- a/ruoyi-ui/src/views/system/oss/config.vue
+++ b/ruoyi-ui/src/views/system/oss/config.vue
@@ -223,7 +223,6 @@
queryParams: {
pageNum: 1,
pageSize: 10,
- reasonable: true,
configKey: undefined,
bucketName: undefined,
status: undefined,
diff --git a/ruoyi-ui/src/views/system/oss/index.vue b/ruoyi-ui/src/views/system/oss/index.vue
index 87bedc9..2bbbba0 100644
--- a/ruoyi-ui/src/views/system/oss/index.vue
+++ b/ruoyi-ui/src/views/system/oss/index.vue
@@ -226,7 +226,6 @@
queryParams: {
pageNum: 1,
pageSize: 10,
- reasonable: true,
fileName: undefined,
originalName: undefined,
fileSuffix: undefined,
diff --git a/ruoyi-ui/src/views/system/post/index.vue b/ruoyi-ui/src/views/system/post/index.vue
index 7a68efa..735d616 100644
--- a/ruoyi-ui/src/views/system/post/index.vue
+++ b/ruoyi-ui/src/views/system/post/index.vue
@@ -192,7 +192,6 @@
queryParams: {
pageNum: 1,
pageSize: 10,
- reasonable: true,
postCode: undefined,
postName: undefined,
status: undefined
diff --git a/ruoyi-ui/src/views/system/role/authUser.vue b/ruoyi-ui/src/views/system/role/authUser.vue
index 51edd33..a65ccbf 100644
--- a/ruoyi-ui/src/views/system/role/authUser.vue
+++ b/ruoyi-ui/src/views/system/role/authUser.vue
@@ -128,7 +128,6 @@
queryParams: {
pageNum: 1,
pageSize: 10,
- reasonable: true,
roleId: undefined,
userName: undefined,
phonenumber: undefined
diff --git a/ruoyi-ui/src/views/system/role/index.vue b/ruoyi-ui/src/views/system/role/index.vue
index a479069..59880bd 100644
--- a/ruoyi-ui/src/views/system/role/index.vue
+++ b/ruoyi-ui/src/views/system/role/index.vue
@@ -328,7 +328,6 @@
queryParams: {
pageNum: 1,
pageSize: 10,
- reasonable: true,
roleName: undefined,
roleKey: undefined,
status: undefined
diff --git a/ruoyi-ui/src/views/system/user/index.vue b/ruoyi-ui/src/views/system/user/index.vue
index 22eaa4b..d06d500 100644
--- a/ruoyi-ui/src/views/system/user/index.vue
+++ b/ruoyi-ui/src/views/system/user/index.vue
@@ -418,7 +418,6 @@
queryParams: {
pageNum: 1,
pageSize: 10,
- reasonable: true,
userName: undefined,
phonenumber: undefined,
status: undefined,
diff --git a/ruoyi-ui/src/views/tool/gen/index.vue b/ruoyi-ui/src/views/tool/gen/index.vue
index 30d9908..1b69e21 100644
--- a/ruoyi-ui/src/views/tool/gen/index.vue
+++ b/ruoyi-ui/src/views/tool/gen/index.vue
@@ -219,7 +219,6 @@
queryParams: {
pageNum: 1,
pageSize: 10,
- reasonable: true,
tableName: undefined,
tableComment: undefined
},
--
Gitblit v1.9.3