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<>();