update Response
parent
1f25abd8f7
commit
310c6f0683
|
@ -23,6 +23,7 @@
|
||||||
|
|
||||||
package cc.iotkit.common.api;
|
package cc.iotkit.common.api;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.IdUtil;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
|
@ -30,9 +31,13 @@ import lombok.NoArgsConstructor;
|
||||||
@Data
|
@Data
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public class Response {
|
public class Response<T> {
|
||||||
private Integer code;
|
private Integer code;
|
||||||
private String message;
|
private String message;
|
||||||
private Object data;
|
private Object data;
|
||||||
private String requestId;
|
private String requestId;
|
||||||
|
|
||||||
|
public static <T> Response success(T data) {
|
||||||
|
return new Response(200,"成功", data, IdUtil.simpleUUID());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue