fix(接口测试): 用例导入如果没有状态加默认值

--user=郭雨琦
--bug=1014775
https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001014775
This commit is contained in:
guoyuqi 2022-07-12 13:51:33 +08:00 committed by xiaomeinvG
parent 2fde5e2b9a
commit 2bda25e0a9
1 changed files with 6 additions and 0 deletions

View File

@ -859,6 +859,12 @@ public class ApiDefinitionService {
apiTestCaseWithBLOBs.setId(UUID.randomUUID().toString());
apiTestCaseMapper.insert(apiTestCaseWithBLOBs);
}
if (StringUtils.isBlank(apiTestCaseWithBLOBs.getStatus())) {
apiTestCaseWithBLOBs.setStatus(APITestStatus.Underway.name());
}
if (apiTestCaseWithBLOBs.getOrder() == null) {
apiTestCaseWithBLOBs.setOrder(getImportNextCaseOrder(apiDefinition.getProjectId()));
}
}
}