package com.cloud.ayc.admin.entity.dto; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @Data public class PageDTO { @ApiModelProperty(value = "当前页") private Integer current = 1; @ApiModelProperty(value = "每页大小") private Integer size = 10; }
//测试的时候添加点数据(这里就不添加了) ListobjectList = new ArrayList<>(); //实现分页 List collect = objectList .stream().skip((dto.getCurrent() - 1) * dto.getSize()) .limit(pageQuery.getSize()) .collect(Collectors.toList());
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)