From 8c25c5d7c2b853ca2e9a18dad34e58fa5fb1dccb Mon Sep 17 00:00:00 2001 From: admin Date: Sun, 2 Apr 2023 17:16:51 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../glxp/api/idc/service/impl/IdcServiceImpl.java | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/glxp/api/idc/service/impl/IdcServiceImpl.java b/src/main/java/com/glxp/api/idc/service/impl/IdcServiceImpl.java index 7e38f2e2..b76fc6fc 100644 --- a/src/main/java/com/glxp/api/idc/service/impl/IdcServiceImpl.java +++ b/src/main/java/com/glxp/api/idc/service/impl/IdcServiceImpl.java @@ -271,12 +271,21 @@ public class IdcServiceImpl implements IdcService { Response response = client.newCall(request).execute(); result = response.body().string(); JSONObject json = JSONObject.parseObject(result); + if(isLastLevel()) { - success = analyToDB(json,files); + if(json.get("code")!=null) { + success = analyToDB(json.getJSONObject("data"),files); + } else { + success = analyToDB(json,files); + } if(!success) logger.info("fetchData-->解析失败"); } else { - syncAddTaskStatus(json,false,success); + if(json.get("code")!=null) { + syncAddTaskStatus(json.getJSONObject("data"),false,success); + } else { + syncAddTaskStatus(json,false,success); + } } if(success) {