From 1690240b56810afd19825964089a414a16ad10eb Mon Sep 17 00:00:00 2001 From: wxg0103 <727495428@qq.com> Date: Wed, 19 Oct 2022 17:21:56 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E5=AE=9A=E4=B9=89):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=89=B9=E9=87=8F=E5=88=A0=E9=99=A4=E5=9C=BA?= =?UTF-8?q?=E6=99=AF=E6=97=A5=E5=BF=97=E6=8A=A5=E9=94=99=E7=9A=84=E7=BC=BA?= =?UTF-8?q?=E9=99=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1018417 --user=王孝刚 【接口测试】批量删除场景的时候日志里有报错 https://www.tapd.cn/55049933/s/1267902 --- .../controller/scenario/ApiScenarioController.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/api-test/backend/src/main/java/io/metersphere/controller/scenario/ApiScenarioController.java b/api-test/backend/src/main/java/io/metersphere/controller/scenario/ApiScenarioController.java index 4fbd209a8b..0e40c93167 100644 --- a/api-test/backend/src/main/java/io/metersphere/controller/scenario/ApiScenarioController.java +++ b/api-test/backend/src/main/java/io/metersphere/controller/scenario/ApiScenarioController.java @@ -7,9 +7,6 @@ import io.metersphere.api.dto.automation.*; import io.metersphere.api.dto.definition.RunDefinitionRequest; import io.metersphere.api.dto.export.ScenarioToPerformanceInfoDTO; import io.metersphere.api.parse.scenario.ScenarioImport; -import io.metersphere.dto.BaseCase; -import io.metersphere.service.scenario.ApiScenarioService; -import io.metersphere.service.ext.ExtApiTaskService; import io.metersphere.base.domain.ApiScenario; import io.metersphere.base.domain.ApiScenarioWithBLOBs; import io.metersphere.base.domain.Schedule; @@ -17,12 +14,15 @@ import io.metersphere.commons.constants.*; import io.metersphere.commons.exception.MSException; import io.metersphere.commons.utils.PageUtils; import io.metersphere.commons.utils.Pager; +import io.metersphere.commons.utils.WebSocketUtil; +import io.metersphere.dto.BaseCase; import io.metersphere.dto.MsExecResponseDTO; import io.metersphere.log.annotation.MsAuditLog; import io.metersphere.notice.annotation.SendNotice; import io.metersphere.request.ResetOrderRequest; +import io.metersphere.service.ext.ExtApiTaskService; +import io.metersphere.service.scenario.ApiScenarioService; import io.metersphere.task.dto.TaskRequestDTO; -import io.metersphere.commons.utils.WebSocketUtil; import org.apache.commons.collections.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.apache.shiro.authz.annotation.Logical; @@ -152,14 +152,14 @@ public class ApiScenarioController { @PostMapping("/move-gc-ids") @MsAuditLog(module = OperLogModule.API_AUTOMATION, type = OperLogConstants.GC, beforeEvent = "#msClass.getLogDetails(#ids)", msClass = ApiScenarioService.class) - @SendNotice(taskType = NoticeConstants.TaskType.API_AUTOMATION_TASK, target = "#targetClass.getApiScenarios(#ids)", targetClass = ApiScenarioService.class, event = NoticeConstants.Event.DELETE, subject = "接口自动化通知") + @SendNotice(taskType = NoticeConstants.TaskType.API_AUTOMATION_TASK, target = "#targetClass.getScenarioCaseByIds(#ids)", targetClass = ApiScenarioService.class, event = NoticeConstants.Event.DELETE, subject = "接口自动化通知") public void removeToGc(@RequestBody List ids) { apiAutomationService.removeToGc(ids); } @PostMapping("/move-gc-batch") @MsAuditLog(module = OperLogModule.API_AUTOMATION, type = OperLogConstants.BATCH_GC, beforeEvent = "#msClass.getLogDetails(#request.ids)", msClass = ApiScenarioService.class) - @SendNotice(taskType = NoticeConstants.TaskType.API_AUTOMATION_TASK, target = "#targetClass.getApiScenarios(#request.ids)", targetClass = ApiScenarioService.class, event = NoticeConstants.Event.DELETE, subject = "接口自动化通知") + @SendNotice(taskType = NoticeConstants.TaskType.API_AUTOMATION_TASK, target = "#targetClass.getScenarioCaseByIds(#request.ids)", targetClass = ApiScenarioService.class, event = NoticeConstants.Event.DELETE, subject = "接口自动化通知") public void removeToGcByBatch(@RequestBody ApiScenarioBatchRequest request) { apiAutomationService.removeToGcByBatch(request); }