|
|
|
@ -4,9 +4,8 @@ import java.io.Serializable;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* common return
|
|
|
|
|
*
|
|
|
|
|
* @param <T>
|
|
|
|
|
* @author xuxueli 2015-12-4 16:32:31
|
|
|
|
|
* @param <T>
|
|
|
|
|
*/
|
|
|
|
|
public class ReturnT<T> implements Serializable {
|
|
|
|
|
public static final long serialVersionUID = 42L;
|
|
|
|
@ -22,14 +21,11 @@ public class ReturnT<T> implements Serializable {
|
|
|
|
|
private String msg;
|
|
|
|
|
private T content;
|
|
|
|
|
|
|
|
|
|
public ReturnT() {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public ReturnT(){}
|
|
|
|
|
public ReturnT(int code, String msg) {
|
|
|
|
|
this.code = code;
|
|
|
|
|
this.msg = msg;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public ReturnT(T content) {
|
|
|
|
|
this.code = SUCCESS_CODE;
|
|
|
|
|
this.content = content;
|
|
|
|
@ -38,23 +34,18 @@ public class ReturnT<T> implements Serializable {
|
|
|
|
|
public int getCode() {
|
|
|
|
|
return code;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void setCode(int code) {
|
|
|
|
|
this.code = code;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public String getMsg() {
|
|
|
|
|
return msg;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void setMsg(String msg) {
|
|
|
|
|
this.msg = msg;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public T getContent() {
|
|
|
|
|
return content;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void setContent(T content) {
|
|
|
|
|
this.content = content;
|
|
|
|
|
}
|
|
|
|
|