diff --git a/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/JupyterServiceImpl.java b/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/JupyterServiceImpl.java index e7fcf857..5c9a55f0 100644 --- a/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/JupyterServiceImpl.java +++ b/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/JupyterServiceImpl.java @@ -72,6 +72,9 @@ public class JupyterServiceImpl implements JupyterService { @Override public String runJupyterService(Integer id) { DevEnvironment devEnvironment = this.devEnvironmentDao.queryById(id); + if(devEnvironment == null){ + + } String envName = devEnvironment.getName(); //TODO 设置环境变量 @@ -136,4 +139,5 @@ public class JupyterServiceImpl implements JupyterService { + } diff --git a/ruoyi-modules/management-platform/src/main/resources/mapper/managementPlatform/DevEnvironmentDaoMapper.xml b/ruoyi-modules/management-platform/src/main/resources/mapper/managementPlatform/DevEnvironmentDaoMapper.xml index 432e9dba..771d3819 100644 --- a/ruoyi-modules/management-platform/src/main/resources/mapper/managementPlatform/DevEnvironmentDaoMapper.xml +++ b/ruoyi-modules/management-platform/src/main/resources/mapper/managementPlatform/DevEnvironmentDaoMapper.xml @@ -26,7 +26,7 @@ select id,name,status,computing_resource,standard,env_variable,image,dataset,model,alt_field1,alt_field2,create_by,create_time,update_by,update_time,state from dev_environment - where id = #{id} + where id = #{id} and state = 1 @@ -35,6 +35,7 @@ id,name,status,computing_resource,standard,env_variable,image,dataset,model,alt_field1,alt_field2,create_by,create_time,update_by,update_time,state from dev_environment + state = 1 and id = #{devEnvironment.id} @@ -93,6 +94,7 @@ select count(1) from dev_environment + state = 1 and id = #{devEnvironment.id}