疯狂的狮子li
2021-09-02 80784433b8506f58463fc1f4a438c053b61b299e
remove 移除分页合理化参数 使用 MP 全局配置分页溢出
已修改17个文件
38 ■■■■ 文件已修改
ruoyi-common/src/main/java/com/ruoyi/common/utils/PageUtils.java 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-generator/src/main/resources/vm/vue/index.vue.vm 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-ui/src/views/demo/demo/index.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-ui/src/views/monitor/job/index.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-ui/src/views/monitor/job/log.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-ui/src/views/monitor/logininfor/index.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-ui/src/views/system/config/index.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-ui/src/views/system/dict/data.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-ui/src/views/system/dict/index.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-ui/src/views/system/notice/index.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-ui/src/views/system/oss/config.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-ui/src/views/system/oss/index.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-ui/src/views/system/post/index.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-ui/src/views/system/role/authUser.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-ui/src/views/system/role/index.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-ui/src/views/system/user/index.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-ui/src/views/tool/gen/index.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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)) {
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
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,
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
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
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
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
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
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
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
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,
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,
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
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
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
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,
ruoyi-ui/src/views/tool/gen/index.vue
@@ -219,7 +219,6 @@
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        reasonable: true,
        tableName: undefined,
        tableComment: undefined
      },