|
|
|
@@ -240,7 +240,7 @@ public class ExperimentInsServiceImpl implements ExperimentInsService { |
|
|
|
String username = loginUser.getUsername(); |
|
|
|
String createdBy = experimentIns.getCreateBy(); |
|
|
|
if (!(StringUtils.equals(username, "admin") || StringUtils.equals(username, createdBy))) { |
|
|
|
throw new RuntimeException("无权限删除该流水线"); |
|
|
|
throw new RuntimeException("无权限删除该实验实例"); |
|
|
|
} |
|
|
|
|
|
|
|
if (StringUtils.isEmpty(experimentIns.getStatus())) { |
|
|
|
@@ -249,7 +249,7 @@ public class ExperimentInsServiceImpl implements ExperimentInsService { |
|
|
|
if (StringUtils.equals(experimentIns.getStatus(), Constant.Running)) { |
|
|
|
throw new RuntimeException("实验实例正在运行,不可删除"); |
|
|
|
} |
|
|
|
experimentIns.setState(0); |
|
|
|
experimentIns.setState(Constant.State_invalid); |
|
|
|
int update = this.experimentInsDao.update(experimentIns); |
|
|
|
if (update > 0) { |
|
|
|
resourceOccupyService.deleteTaskState(Constant.TaskType_Workflow, Long.valueOf(experimentIns.getExperimentId()), Long.valueOf(id)); |
|
|
|
|