|
|
@@ -1,5 +1,6 @@
|
|
|
package com.zhongshu.card.server.core.httpRequest.apiConf;
|
|
|
|
|
|
+import cn.hutool.json.JSONUtil;
|
|
|
import lombok.AllArgsConstructor;
|
|
|
import lombok.Data;
|
|
|
import lombok.NoArgsConstructor;
|
|
|
@@ -19,6 +20,13 @@ public class APIResponseModel {
|
|
|
private String content;
|
|
|
private ApiConfParam param;
|
|
|
|
|
|
+ public <T> T toBean(Class<T> tClass) {
|
|
|
+ if (content != null) {
|
|
|
+ return JSONUtil.toBean(content, tClass);
|
|
|
+ }
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+
|
|
|
public boolean isSuccess() {
|
|
|
return success;
|
|
|
}
|