From 55e5468e382ca43af260cf9539f63f4d9df6328c Mon Sep 17 00:00:00 2001 From: song-tianyang Date: Wed, 19 May 2021 13:39:46 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=B3=A8=E9=87=8A=E6=A3=80=E6=9F=A5?= =?UTF-8?q?=E5=9C=BA=E6=99=AF=E6=98=AF=E5=90=A6=E6=9C=89=E6=9C=AA=E5=AE=8C?= =?UTF-8?q?=E6=88=90=E7=9A=84=E6=89=A7=E8=A1=8C=E4=BB=BB=E5=8A=A1=E7=9A=84?= =?UTF-8?q?=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 注释检查场景是否有未完成的执行任务的方法 --- .../api/service/ApiAutomationService.java | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java b/backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java index 1352e07d35..355b147443 100644 --- a/backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java +++ b/backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java @@ -860,7 +860,7 @@ public class ApiAutomationService { List 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 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 ids) { - List 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 ids) { +// List lastReportStatusByIds = apiReportService.selectLastReportByIds(ids); +// for (ApiScenarioReport report : lastReportStatusByIds) { +// if (StringUtils.equals(report.getStatus(), APITestStatus.Running.name())) { +// MSException.throwException(report.getName() + " Is Running!"); +// } +// } +// } /** * 获取前台查询条件查询的所有(未经分页筛选)数据ID