This commit is contained in:
Chuck1sn
2025-05-14 10:16:48 +08:00
commit 3cd59337e7
220 changed files with 23768 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
package com.zl.mjga.dto;
import jakarta.annotation.Nullable;
import lombok.*;
@Data
public class PageResponseDto<T> {
private long total;
private T data;
public PageResponseDto(long total, @Nullable T data) {
if (total < 0) {
throw new IllegalArgumentException("total must not be less than zero");
}
this.total = total;
this.data = data;
}
public static <T> PageResponseDto<T> empty() {
return new PageResponseDto<>(0, null);
}
}