package com.persagy.bdtp.adm.entity; import lombok.Data; /** * 调用服务时记录分页信息 */ @Data public class Pagination { private int pageNum = 1; private int pageSize; private int total = -1; private boolean hasNext = true; public Pagination(int pageSize) { this.pageSize = pageSize; } public void next() { pageNum++; if ((pageNum - 1) * pageSize >= total) hasNext = false; else hasNext = true; } }