refactor(测试计划): 接口&场景执行状态默认值

This commit is contained in:
WangXu10 2024-06-17 18:22:58 +08:00 committed by Craftsman
parent 849bff9498
commit 9e22faaf36
4 changed files with 7 additions and 1 deletions

View File

@ -74,4 +74,7 @@ public class TestPlanApiCasePageResponse implements Serializable {
@Schema(description = "协议")
private String protocol;
@Schema(description = "接口用例id")
private String apiTestCaseId;
}

View File

@ -420,7 +420,8 @@
t.execute_user,
t.last_exec_time,
t.last_exec_report_id,
atc.status
atc.status,
atc.id as apiTestCaseId
FROM
api_test_case atc
INNER JOIN api_definition a ON atc.api_definition_id = a.id

View File

@ -585,6 +585,7 @@ public class TestPlanApiCaseService extends TestPlanResourceService {
testPlanApiCase.setCreateUser(user.getId());
testPlanApiCase.setPos(nextOrder.getAndAdd(DEFAULT_NODE_INTERVAL_POS));
testPlanApiCase.setExecuteUser(apiTestCase.getCreateUser());
testPlanApiCase.setLastExecResult(ExecStatus.PENDING.name());
testPlanApiCaseList.add(testPlanApiCase);
buildLog(logDTOS, testPlan, user, apiTestCase);
});

View File

@ -224,6 +224,7 @@ public class TestPlanApiScenarioService extends TestPlanResourceService {
testPlanApiScenario.setCreateUser(user.getId());
testPlanApiScenario.setPos(nextOrder.getAndAdd(DEFAULT_NODE_INTERVAL_POS));
testPlanApiScenario.setExecuteUser(scenario.getCreateUser());
testPlanApiScenario.setLastExecResult(ExecStatus.PENDING.name());
testPlanApiScenarioList.add(testPlanApiScenario);
buildLog(logDTOS, testPlan, user, scenario);
});