This commit is contained in:
@@ -5,11 +5,11 @@
|
||||
*/
|
||||
package org.redkale.service;
|
||||
|
||||
import org.redkale.convert.json.*;
|
||||
import org.redkale.convert.json.JsonFactory;
|
||||
|
||||
/**
|
||||
* 通用的结果对象,在常见的HTTP+JSON接口中返回的结果需要含结果码,错误信息,和实体对象。
|
||||
*
|
||||
* <p>
|
||||
* <p>
|
||||
* 详情见: http://redkale.org
|
||||
*
|
||||
@@ -109,6 +109,17 @@ public class RetResult<T> {
|
||||
this.result = result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 同 setResult
|
||||
*
|
||||
* @param result
|
||||
* @return
|
||||
*/
|
||||
public RetResult result(T result) {
|
||||
this.result = result;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return JsonFactory.root().getConvert().convertTo(this);
|
||||
|
||||
Reference in New Issue
Block a user