fix: 注释检查场景是否有未完成的执行任务的方法

注释检查场景是否有未完成的执行任务的方法
This commit is contained in:
song-tianyang 2021-05-19 13:39:46 +08:00 committed by 刘瑞斌
parent 316e6fb775
commit 55e5468e38
1 changed files with 10 additions and 10 deletions

View File

@ -860,7 +860,7 @@ public class ApiAutomationService {
List<String> ids = request.getIds();
//检查是否有正在执行中的情景
this.checkScenarioIsRunning(ids);
// this.checkScenarioIsRunning(ids);
StringBuilder idStr = new StringBuilder();
ids.forEach(item -> {
@ -1151,7 +1151,7 @@ public class ApiAutomationService {
(query) -> extApiScenarioMapper.selectIdsByQuery((ApiScenarioRequest) query));
List<String> ids = request.getIds();
//检查是否有正在执行中的情景
this.checkScenarioIsRunning(ids);
// this.checkScenarioIsRunning(ids);
StringBuilder idStr = new StringBuilder();
ids.forEach(item -> {
idStr.append("\"").append(item).append("\"").append(",");
@ -1207,14 +1207,14 @@ public class ApiAutomationService {
}
}
public void checkScenarioIsRunning(List<String> ids) {
List<ApiScenarioReport> lastReportStatusByIds = apiReportService.selectLastReportByIds(ids);
for (ApiScenarioReport report : lastReportStatusByIds) {
if (StringUtils.equals(report.getStatus(), APITestStatus.Running.name())) {
MSException.throwException(report.getName() + " Is Running!");
}
}
}
// public void checkScenarioIsRunning(List<String> ids) {
// List<ApiScenarioReport> lastReportStatusByIds = apiReportService.selectLastReportByIds(ids);
// for (ApiScenarioReport report : lastReportStatusByIds) {
// if (StringUtils.equals(report.getStatus(), APITestStatus.Running.name())) {
// MSException.throwException(report.getName() + " Is Running!");
// }
// }
// }
/**
* 获取前台查询条件查询的所有(未经分页筛选)数据ID