This commit is contained in:
Redkale
2020-06-14 14:25:13 +08:00
parent 6358719255
commit 6e5da92263

View File

@@ -78,8 +78,9 @@ public class RetResult<T> {
return c; return c;
} }
public void convert(Convert convert) { public RetResult convert(Convert convert) {
this.convert = convert; this.convert = convert;
return this;
} }
public static RetResult success() { public static RetResult success() {
@@ -113,7 +114,7 @@ public class RetResult<T> {
* @since 2.1.0 * @since 2.1.0
*/ */
public <R> RetResult<R> mapTo(Function<T, R> mapper) { public <R> RetResult<R> mapTo(Function<T, R> mapper) {
return new RetResult<>(mapper.apply(this.result)).retcode(this.retcode).retinfo(this.retinfo).attach(this.attach); return new RetResult<>(mapper.apply(this.result)).convert(this.convert).retcode(this.retcode).retinfo(this.retinfo).attach(this.attach);
} }
/** /**