DecodeBody.java
459 Bytes
package com.topdraw.dockingapi.entity;
import lombok.Data;
/**
* @author wenxin
* @version 1.0
* @date 2024/5/23 下午5:57
*/
@Data
public class DecodeBody<T> {
private String errcode;
private String errmsg;
private T data;
public static <T> DecodeBody<T> fail(String errcode, String mesg) {
DecodeBody<T> body = new DecodeBody<>();
body.setErrcode("-1");
body.setErrmsg(mesg);
return body;
}
}