mirror of
https://codeup.aliyun.com/64f7d6b8ce01efaafef1e678/coal/coal.git
synced 2026-01-25 07:46:40 +08:00
完善
This commit is contained in:
@@ -1,18 +1,24 @@
|
||||
package cn.lihongjie.coal.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class R<T> {
|
||||
private T data;
|
||||
|
||||
private String code ;
|
||||
private String code;
|
||||
|
||||
private String msg;
|
||||
|
||||
@JsonInclude(Include.NON_NULL)
|
||||
private Integer pageNo;
|
||||
@JsonInclude(Include.NON_NULL)
|
||||
private Integer pageSize;
|
||||
@JsonInclude(Include.NON_NULL)
|
||||
private Integer totalPage;
|
||||
@JsonInclude(Include.NON_NULL)
|
||||
private Integer totalCount;
|
||||
|
||||
|
||||
@@ -30,6 +36,7 @@ public class R<T> {
|
||||
public static <T> R<T> success(T data) {
|
||||
return create(data, "ok", "");
|
||||
}
|
||||
|
||||
public static <T> R<T> fail(String code, String msg) {
|
||||
return create(null, code, msg);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user