初始化项目

This commit is contained in:
andy committed 2026-01-23 17:20:52 +08:00
commit 60c416e553
79 files changed
+5609

No files matched your search

@@ -0,0 +1,55 @@
package com.bycrm.common;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* 分页结果
*/
@Data
public class PageResult<T> implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 总记录数
*/
private Long total;
/**
* 当前页数据
*/
private List<T> records;
/**
* 当前页
*/
private Long current;
/**
* 每页大小
*/
private Long size;
/**
* 总页数
*/
private Long pages;
public PageResult() {
}
public PageResult(Long total, List<T> records, Long current, Long size) {
this.total = total;
this.records = records;
this.current = current;
this.size = size;
this.pages = (total + size - 1) / size;
}
public static <T> PageResult<T> of(Long total, List<T> records, Long current, Long size) {
return new PageResult<>(total, records, current, size);
}
}