diff --git a/backend/services/api-test/src/main/java/io/metersphere/api/dto/scenario/ApiScenarioReportStepDTO.java b/backend/services/api-test/src/main/java/io/metersphere/api/dto/scenario/ApiScenarioReportStepDTO.java
index 724390a5f4..45ff1255e6 100644
--- a/backend/services/api-test/src/main/java/io/metersphere/api/dto/scenario/ApiScenarioReportStepDTO.java
+++ b/backend/services/api-test/src/main/java/io/metersphere/api/dto/scenario/ApiScenarioReportStepDTO.java
@@ -1,5 +1,6 @@
package io.metersphere.api.dto.scenario;
+import io.metersphere.sdk.constants.ApiReportStatus;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@@ -27,7 +28,7 @@ public class ApiScenarioReportStepDTO {
private String parentId;
@Schema(description = "结果状态")
- private String status;
+ private String status = ApiReportStatus.PENDING.name();
@Schema(description = "误报编号/误报状态独有")
private String fakeCode;
diff --git a/backend/services/api-test/src/main/java/io/metersphere/api/service/definition/ApiDefinitionNoticeService.java b/backend/services/api-test/src/main/java/io/metersphere/api/service/definition/ApiDefinitionNoticeService.java
index c847f505c1..4377c9bbfd 100644
--- a/backend/services/api-test/src/main/java/io/metersphere/api/service/definition/ApiDefinitionNoticeService.java
+++ b/backend/services/api-test/src/main/java/io/metersphere/api/service/definition/ApiDefinitionNoticeService.java
@@ -36,6 +36,8 @@ public class ApiDefinitionNoticeService {
public ApiDefinitionCaseDTO getUpdateApiDTO(ApiDefinitionUpdateRequest request) {
ApiDefinitionCaseDTO caseDTO = new ApiDefinitionCaseDTO();
+ ApiDefinition apiDefinition = apiDefinitionMapper.selectByPrimaryKey(request.getId());
+ BeanUtils.copyBean(caseDTO, apiDefinition);
BeanUtils.copyBean(caseDTO, request);
return caseDTO;
}
diff --git a/backend/services/api-test/src/main/java/io/metersphere/api/service/definition/ApiTestCaseNoticeService.java b/backend/services/api-test/src/main/java/io/metersphere/api/service/definition/ApiTestCaseNoticeService.java
index ebd3fe327d..23d6708c4e 100644
--- a/backend/services/api-test/src/main/java/io/metersphere/api/service/definition/ApiTestCaseNoticeService.java
+++ b/backend/services/api-test/src/main/java/io/metersphere/api/service/definition/ApiTestCaseNoticeService.java
@@ -36,13 +36,9 @@ public class ApiTestCaseNoticeService {
public ApiDefinitionCaseDTO getCaseDTO(ApiTestCaseUpdateRequest request) {
ApiDefinitionCaseDTO caseDTO = new ApiDefinitionCaseDTO();
+ ApiTestCase testCase = apiTestCaseMapper.selectByPrimaryKey(request.getId());
+ BeanUtils.copyBean(caseDTO, testCase);
BeanUtils.copyBean(caseDTO, request);
- caseDTO.setName(null);
- caseDTO.setStatus(null);
- caseDTO.setCaseCreateUser(null);
- caseDTO.setCaseUpdateUser(null);
- caseDTO.setCaseName(request.getName());
- caseDTO.setCaseStatus(request.getStatus());
return caseDTO;
}
diff --git a/backend/services/api-test/src/main/java/io/metersphere/api/service/scenario/ApiScenarioNoticeService.java b/backend/services/api-test/src/main/java/io/metersphere/api/service/scenario/ApiScenarioNoticeService.java
index be13e550bb..a429c87456 100644
--- a/backend/services/api-test/src/main/java/io/metersphere/api/service/scenario/ApiScenarioNoticeService.java
+++ b/backend/services/api-test/src/main/java/io/metersphere/api/service/scenario/ApiScenarioNoticeService.java
@@ -9,6 +9,7 @@ import io.metersphere.sdk.util.BeanUtils;
import io.metersphere.sdk.util.SubListUtils;
import io.metersphere.system.domain.Schedule;
import io.metersphere.system.domain.ScheduleExample;
+import io.metersphere.system.dto.sdk.ApiScenarioMessageDTO;
import io.metersphere.system.mapper.ScheduleMapper;
import jakarta.annotation.Resource;
import org.apache.commons.collections.CollectionUtils;
@@ -52,21 +53,23 @@ public class ApiScenarioNoticeService {
return dtoList;
}
- public ApiScenarioDTO getScenarioDTO(ApiScenarioAddRequest request) {
- ApiScenarioDTO scenarioDTO = new ApiScenarioDTO();
+ public ApiScenarioMessageDTO getScenarioDTO(ApiScenarioAddRequest request) {
+ ApiScenarioMessageDTO scenarioDTO = new ApiScenarioMessageDTO();
BeanUtils.copyBean(scenarioDTO, request);
return scenarioDTO;
}
- public ApiScenarioDTO getScenarioDTO(ApiScenarioUpdateRequest request) {
- ApiScenarioDTO scenarioDTO = new ApiScenarioDTO();
+ public ApiScenarioMessageDTO getScenarioDTO(ApiScenarioUpdateRequest request) {
+ ApiScenarioMessageDTO scenarioDTO = new ApiScenarioMessageDTO();
+ ApiScenario apiScenario = apiScenarioMapper.selectByPrimaryKey(request.getId());
+ BeanUtils.copyBean(scenarioDTO, apiScenario);
BeanUtils.copyBean(scenarioDTO, request);
return scenarioDTO;
}
- public ApiScenarioDTO getScenarioDTO(String id) {
+ public ApiScenarioMessageDTO getScenarioDTO(String id) {
ApiScenario apiScenario = apiScenarioMapper.selectByPrimaryKey(id);
- ApiScenarioDTO scenarioDTO = new ApiScenarioDTO();
+ ApiScenarioMessageDTO scenarioDTO = new ApiScenarioMessageDTO();
BeanUtils.copyBean(scenarioDTO, apiScenario);
return scenarioDTO;
}
diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/mapper/ExtScheduleMapper.xml b/backend/services/system-setting/src/main/java/io/metersphere/system/mapper/ExtScheduleMapper.xml
index ce4566fea9..086aee8789 100644
--- a/backend/services/system-setting/src/main/java/io/metersphere/system/mapper/ExtScheduleMapper.xml
+++ b/backend/services/system-setting/src/main/java/io/metersphere/system/mapper/ExtScheduleMapper.xml
@@ -149,17 +149,9 @@
select task.* from (
SELECT
- schedule.id,
- schedule.name as taskname,
- schedule.project_id,
- resource_type,
+ schedule.*,
ads.num as resource_num,
- ads.name as resource_name,
- ads.id as resource_id,
- schedule.value,
- schedule.enable,
- schedule.create_user AS createUserName,
- schedule.create_time
+ ads.name as resource_name
FROM
schedule
inner join api_definition_swagger ads on schedule.resource_id = ads.id
@@ -167,17 +159,9 @@
SELECT
- schedule.id,
- schedule.name as taskname,
- schedule.project_id,
- resource_type,
+ schedule.*,
api_scenario.num as resource_num,
- api_scenario.name as resource_name,
- api_scenario.id as resource_id,
- schedule.value,
- schedule.enable,
- schedule.create_user AS createUserName,
- schedule.create_time
+ api_scenario.name as resource_name
FROM
schedule
inner join api_scenario on schedule.resource_id = api_scenario.id
diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/notice/constants/NoticeConstants.java b/backend/services/system-setting/src/main/java/io/metersphere/system/notice/constants/NoticeConstants.java
index 7a1b64e5c3..765bebdbb5 100644
--- a/backend/services/system-setting/src/main/java/io/metersphere/system/notice/constants/NoticeConstants.java
+++ b/backend/services/system-setting/src/main/java/io/metersphere/system/notice/constants/NoticeConstants.java
@@ -534,5 +534,6 @@ public interface NoticeConstants {
String platformBugId = "platformBugId";
String handleUsers = "handleUsers";
String groupId = "groupId";
+ String job = "job";
}
}