From ea31f2f830be3a87f602eb5101c61a9bc05e494c Mon Sep 17 00:00:00 2001 From: chenzhihang <709011834@qq.com> Date: Mon, 12 May 2025 09:45:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=BD=AC=E6=8D=A2=E6=B5=81?= =?UTF-8?q?=E6=B0=B4=E7=BA=BF=E5=A4=B1=E8=B4=A5=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../platform/service/impl/ActiveLearnServiceImpl.java | 5 +++++ .../ruoyi/platform/service/impl/ExperimentServiceImpl.java | 4 ++++ .../platform/service/impl/MachineLearnServiceImpl.java | 7 +++++++ .../com/ruoyi/platform/service/impl/RayServiceImpl.java | 6 ++++++ 4 files changed, 22 insertions(+) diff --git a/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/ActiveLearnServiceImpl.java b/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/ActiveLearnServiceImpl.java index 1a00356a..044df3b0 100644 --- a/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/ActiveLearnServiceImpl.java +++ b/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/ActiveLearnServiceImpl.java @@ -157,6 +157,11 @@ public class ActiveLearnServiceImpl implements ActiveLearnService { throw new RuntimeException("转换流水线失败"); } Map converMap = JsonUtils.jsonToMap(convertRes); + String convertResData = (String) converMap.get("data"); + if (StringUtils.isEmpty(convertResData)) { + throw new RuntimeException("转换流水线失败"); + } + // 组装运行接口json Map output = (Map) converMap.get("output"); Map runReqMap = new HashMap<>(); diff --git a/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/ExperimentServiceImpl.java b/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/ExperimentServiceImpl.java index 96193527..01227f7d 100644 --- a/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/ExperimentServiceImpl.java +++ b/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/ExperimentServiceImpl.java @@ -237,6 +237,10 @@ public class ExperimentServiceImpl implements ExperimentService { throw new Exception("转换流水线失败"); } Map converMap = JsonUtils.jsonToMap(convertRes); + String convertResData = (String) converMap.get("data"); + if (StringUtils.isEmpty(convertResData)) { + throw new RuntimeException("转换流水线失败"); + } // 判断积分和资源是否足够 Map> resourceInfo = (Map>) converMap.get("resource_info"); diff --git a/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/MachineLearnServiceImpl.java b/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/MachineLearnServiceImpl.java index dc803c63..55759a9f 100644 --- a/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/MachineLearnServiceImpl.java +++ b/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/MachineLearnServiceImpl.java @@ -165,6 +165,13 @@ public class MachineLearnServiceImpl implements MachineLearnService { if (convertRes == null || StringUtils.isEmpty(convertRes)) { throw new RuntimeException("转换流水线失败"); } + + Map convertResMap = JsonUtils.jsonToMap(convertRes); + String convertResData = (String) convertResMap.get("data"); + if (StringUtils.isEmpty(convertResData)) { + throw new RuntimeException("转换流水线失败"); + } + Map converMap = JsonUtils.jsonToMap(convertRes); // 组装运行接口json Map output = (Map) converMap.get("output"); diff --git a/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/RayServiceImpl.java b/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/RayServiceImpl.java index e40acbe0..cbdb53c7 100644 --- a/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/RayServiceImpl.java +++ b/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/RayServiceImpl.java @@ -175,7 +175,13 @@ public class RayServiceImpl implements RayService { if (convertRes == null || StringUtils.isEmpty(convertRes)) { throw new RuntimeException("转换流水线失败"); } + Map converMap = JsonUtils.jsonToMap(convertRes); + String convertResData = (String) converMap.get("data"); + if (StringUtils.isEmpty(convertResData)) { + throw new RuntimeException("转换流水线失败"); + } + // 组装运行接口json Map output = (Map) converMap.get("output"); Map runReqMap = new HashMap<>();