Blame view

src/main/java/cn/iocoder/dashboard/common/pojo/PageResult.java 747 Bytes
0a607861   YunaiV   common 包,基础组件
1
2
3
4
5
6
7
  package cn.iocoder.dashboard.common.pojo;
  
  import io.swagger.annotations.ApiModel;
  import io.swagger.annotations.ApiModelProperty;
  import lombok.Data;
  
  import java.io.Serializable;
f5b7142a   YunaiV   完成用户列表的前后端对接
8
  import java.util.ArrayList;
0a607861   YunaiV   common 包,基础组件
9
10
11
12
13
14
15
16
17
18
19
20
  import java.util.List;
  
  @ApiModel("分页结果")
  @Data
  public final class PageResult<T> implements Serializable {
  
      @ApiModelProperty(value = "数据", required = true)
      private List<T> list;
  
      @ApiModelProperty(value = "总量", required = true)
      private Long total;
  
f5b7142a   YunaiV   完成用户列表的前后端对接
21
22
23
24
25
26
27
28
29
30
31
32
33
      public PageResult() {
      }
  
      public PageResult(List<T> list, Long total) {
          this.list = list;
          this.total = total;
      }
  
      public PageResult(Long total) {
          this.list = new ArrayList<>();
          this.total = total;
      }
  
0a607861   YunaiV   common 包,基础组件
34
  }