diff --git a/backend/services/api-test/src/main/java/io/metersphere/api/controller/scenario/ApiScenarioController.java b/backend/services/api-test/src/main/java/io/metersphere/api/controller/scenario/ApiScenarioController.java index de0966ea5a..a0e4ef8928 100644 --- a/backend/services/api-test/src/main/java/io/metersphere/api/controller/scenario/ApiScenarioController.java +++ b/backend/services/api-test/src/main/java/io/metersphere/api/controller/scenario/ApiScenarioController.java @@ -214,7 +214,7 @@ public class ApiScenarioController { @GetMapping(value = "/schedule-config-delete/{scenarioId}") @Operation(summary = "接口测试-接口场景管理-删除定时任务配置") @RequiresPermissions(PermissionConstants.PROJECT_API_SCENARIO_EXECUTE) - @Log(type = OperationLogType.UPDATE, expression = "#msClass.scheduleLog(#request.getScenarioId())", msClass = ApiScenarioLogService.class) + @Log(type = OperationLogType.UPDATE, expression = "#msClass.scheduleLog(#scenarioId)", msClass = ApiScenarioLogService.class) @CheckOwner(resourceId = "#scenarioId", resourceType = "api_scenario") public void deleteScheduleConfig(@PathVariable String scenarioId) { apiValidateService.validateApiMenuInProject(scenarioId, ApiResource.API_SCENARIO.name()); diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/schedule/ScheduleService.java b/backend/services/system-setting/src/main/java/io/metersphere/system/schedule/ScheduleService.java index ea960e6168..78d57c49ca 100644 --- a/backend/services/system-setting/src/main/java/io/metersphere/system/schedule/ScheduleService.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/schedule/ScheduleService.java @@ -118,7 +118,9 @@ public class ScheduleService { ScheduleExample example = new ScheduleExample(); example.createCriteria().andResourceIdEqualTo(scheduleConfig.getResourceId()).andJobEqualTo(clazz.getName()); List scheduleList = scheduleMapper.selectByExample(example); + boolean needSendNotice = false; if (CollectionUtils.isNotEmpty(scheduleList)) { + needSendNotice = !scheduleList.getFirst().getEnable().equals(scheduleConfig.getEnable()); schedule = scheduleConfig.genCronSchedule(scheduleList.getFirst()); schedule.setUpdateTime(System.currentTimeMillis()); schedule.setJob(clazz.getName()); @@ -134,7 +136,7 @@ public class ScheduleService { } //通知 if ((CollectionUtils.isEmpty(scheduleList) && BooleanUtils.isTrue(scheduleConfig.getEnable())) - || (CollectionUtils.isNotEmpty(scheduleList) && !scheduleList.getFirst().getEnable().equals(scheduleConfig.getEnable()))) { + || needSendNotice) { apiScheduleNoticeService.sendScheduleNotice(schedule, operator); } diff --git a/frontend/src/views/api-test/management/components/import.vue b/frontend/src/views/api-test/management/components/import.vue index 5bef6c94a4..4580fd4767 100644 --- a/frontend/src/views/api-test/management/components/import.vue +++ b/frontend/src/views/api-test/management/components/import.vue @@ -395,7 +395,7 @@ const defaultForm: ImportApiDefinitionRequest = { platform: RequestImportFormat.SWAGGER, name: '', - moduleId: 'root', + moduleId: '', coverData: false, syncCase: true, coverModule: false,