Skip to content

Commit

Permalink
保留Page移除方法至PageDto(反序列化).
Browse files Browse the repository at this point in the history
  • Loading branch information
nieqiurong committed Mar 16, 2024
1 parent 61e302d commit cabd2c8
Showing 1 changed file with 26 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,18 @@
*/
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> {

private static final long serialVersionUID = 1L;

public PageDTO() {
Expand Down Expand Up @@ -59,4 +64,25 @@ public static <T> Page<T> of(long current, long size, boolean searchCount) {
public static <T> Page<T> of(long current, long size, long total, boolean searchCount) {
return new PageDTO<>(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;
}

}

0 comments on commit cabd2c8

Please sign in to comment.