/*
 * Copyright (c) 2011-2021, baomidou (jobob@qq.com).
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.baomidou.mybatisplus.extension.plugins.pagination;

import com.baomidou.mybatisplus.core.metadata.OrderItem;

import java.util.List;

/**
 * 简单分页模型 DTO 用于解决跨服务数据传输问题，不影响 Page 作为返回对象序列化 JSON 产生不必要的数据
 *
 * @author hubin
 * @since 2021-05-20
 */
public class PageDTO<T> extends Page<T> {

    public PageDTO() {
    }

    public PageDTO(long current, long size) {
        this(current, size, 0);
    }

    public PageDTO(long current, long size, long total) {
        this(current, size, total, true);
    }

    public PageDTO(long current, long size, boolean searchCount) {
        this(current, size, 0, searchCount);
    }

    public PageDTO(long current, long size, long total, boolean searchCount) {
        super(current, size, total, searchCount);
    }

    public String getCountId() {
        return this.countId;
    }

    public Long getMaxLimit() {
        return this.maxLimit;
    }

    public List<OrderItem> getOrders() {
        return this.orders;
    }

    public boolean isOptimizeCountSql() {
        return this.optimizeCountSql;
    }

    public boolean isSearchCount() {
        return this.searchCount;
    }

    /* --------------- 以下为静态构造方式 --------------- */
    public static <T> Page<T> of(long current, long size) {
        return of(current, size, 0);
    }

    public static <T> Page<T> of(long current, long size, long total) {
        return of(current, size, total, true);
    }

    public static <T> Page<T> of(long current, long size, boolean searchCount) {
        return of(current, size, 0, searchCount);
    }

    public static <T> Page<T> of(long current, long size, long total, boolean searchCount) {
        return new PageDTO(current, size, total, searchCount);
    }
}

@@ -1379,32 +1379,46 @@
 hCount);%0A    %7D%0A%0A
+    @Override%0A
     public Strin
@@ -1430,24 +1430,24 @@
 CountId() %7B%0A
-
         retu
@@ -1462,32 +1462,46 @@
 countId;%0A    %7D%0A%0A
+    @Override%0A
     public Long 
@@ -1545,32 +1545,46 @@
 axLimit;%0A    %7D%0A%0A
+    @Override%0A
     public List%3C
@@ -1635,32 +1635,46 @@
 .orders;%0A    %7D%0A%0A
+    @Override%0A
     public boole
@@ -1736,32 +1736,46 @@
 ountSql;%0A    %7D%0A%0A
+    @Override%0A
     public boole
@@ -2374,16 +2374,18 @@
  PageDTO
+%3C%3E
 (current

Fix PageDTO compiler warnings