You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
866 B
44 lines
866 B
package com.community.pocket.entity.vo;
|
|
|
|
//接口统一返回json响应体
|
|
public class JSONResponse<T> {
|
|
// 响应结果
|
|
private Result result;
|
|
// 响应详细结果
|
|
private String message;
|
|
// 自定义其他响应信息
|
|
private T body;
|
|
|
|
public JSONResponse() {
|
|
}
|
|
|
|
public JSONResponse(Result result, String message, T body) {
|
|
this.result = result;
|
|
this.message = message;
|
|
this.body = body;
|
|
}
|
|
|
|
public Result getResult() {
|
|
return result;
|
|
}
|
|
|
|
public void setResult(Result result) {
|
|
this.result = result;
|
|
}
|
|
|
|
public String getMessage() {
|
|
return message;
|
|
}
|
|
|
|
public void setMessage(String message) {
|
|
this.message = message;
|
|
}
|
|
|
|
public T getBody() {
|
|
return body;
|
|
}
|
|
|
|
public void setBody(T body) {
|
|
this.body = body;
|
|
}
|
|
}
|
|
|