|
|
@@ -1,5 +1,6 @@
|
|
|
package com.zswl.dataservice.httpRequest.apiConf;
|
|
|
|
|
|
+import cn.hutool.json.JSONObject;
|
|
|
import cn.hutool.json.JSONUtil;
|
|
|
import lombok.AllArgsConstructor;
|
|
|
import lombok.Data;
|
|
|
@@ -29,6 +30,13 @@ public class APIResponseModel {
|
|
|
return null;
|
|
|
}
|
|
|
|
|
|
+ public JSONObject toJson() {
|
|
|
+ if (content != null) {
|
|
|
+ return JSONUtil.parseObj(content);
|
|
|
+ }
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+
|
|
|
public boolean isSuccess() {
|
|
|
if (StringUtils.isNotEmpty(this.state) && "Fail".equals(state)) {
|
|
|
return failed;
|