This commit is contained in:
RedKale
2016-06-26 22:25:24 +08:00
parent 511a31bf95
commit 5593a518fc

View File

@@ -42,7 +42,7 @@ public class RetResult<T> {
protected String retinfo; protected String retinfo;
private T result; protected T result;
public RetResult() { public RetResult() {
} }
@@ -88,6 +88,18 @@ public class RetResult<T> {
this.retcode = retcode; this.retcode = retcode;
} }
/**
* 同 setRetcode
*
* @param retcode
*
* @return
*/
public RetResult<T> retcode(int retcode) {
this.retcode = retcode;
return this;
}
public String getRetinfo() { public String getRetinfo() {
return retinfo; return retinfo;
} }
@@ -96,6 +108,18 @@ public class RetResult<T> {
this.retinfo = retinfo; this.retinfo = retinfo;
} }
/**
* 同 setRetinfo
*
* @param retinfo
*
* @return
*/
public RetResult<T> retinfo(String retinfo) {
this.retinfo = retinfo;
return this;
}
/** /**
* 结果对象, 通常只有在retcode = 0时值才有效 * 结果对象, 通常只有在retcode = 0时值才有效
* *
@@ -113,9 +137,10 @@ public class RetResult<T> {
* 同 setResult * 同 setResult
* *
* @param result * @param result
*
* @return * @return
*/ */
public RetResult result(T result) { public RetResult<T> result(T result) {
this.result = result; this.result = result;
return this; return this;
} }