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 5145fbb093
commit 0e88472fe9
1 changed files with 6 additions and 0 deletions

View File

@ -836,6 +836,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()));
}
}
}