|
|
@@ -1,7 +1,10 @@
|
|
|
package com.ublinkage.datacollection.service;
|
|
|
|
|
|
import cn.hutool.core.io.FileUtil;
|
|
|
-import com.alibaba.fastjson.JSONObject;
|
|
|
+import com.alibaba.fastjson2.JSON;
|
|
|
+import com.alibaba.fastjson2.JSONObject;
|
|
|
+import com.alibaba.fastjson2.JSONReader;
|
|
|
+import com.alibaba.fastjson2.JSONWriter;
|
|
|
import com.ublinkage.datacollection.Constant;
|
|
|
import com.ublinkage.datacollection.entity.PublishInfo;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
@@ -612,10 +615,12 @@ public class QxybDataService {
|
|
|
try {
|
|
|
response = client.newCall(request).execute();
|
|
|
result = response.body().string();
|
|
|
- JSONObject json = JSONObject.parseObject(result);
|
|
|
+ JSONObject json = JSON.parseObject(result);
|
|
|
Integer code = json.getInteger("code");
|
|
|
if (code != null && code == 200) {
|
|
|
- String data = json.getString("data");
|
|
|
+ JSONObject dataObject = json.getJSONObject("data");
|
|
|
+ String data = null == dataObject
|
|
|
+ ? "" : dataObject.toJSONString(JSONWriter.Feature.LargeObject);
|
|
|
if (data == null || "[]".equals(data) || "{}".equals(data)) {
|
|
|
throw new RuntimeException("无有效数据");
|
|
|
}
|