fix(接口测试): 用例导入报错
--user=郭雨琦 --bug=1014790 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001014790
This commit is contained in:
parent
3eea5fbd4c
commit
e25545f8ed
|
@ -852,18 +852,18 @@ public class ApiDefinitionService {
|
|||
apiTestCaseWithBLOBs.setCreateTime(System.currentTimeMillis());
|
||||
}
|
||||
apiTestCaseWithBLOBs.setUpdateTime(System.currentTimeMillis());
|
||||
if (StringUtils.isNotBlank(apiTestCaseWithBLOBs.getId())) {
|
||||
apiTestCaseMapper.updateByPrimaryKeyWithBLOBs(apiTestCaseWithBLOBs);
|
||||
} else {
|
||||
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()));
|
||||
}
|
||||
if (StringUtils.isNotBlank(apiTestCaseWithBLOBs.getId())) {
|
||||
apiTestCaseMapper.updateByPrimaryKeyWithBLOBs(apiTestCaseWithBLOBs);
|
||||
} else {
|
||||
apiTestCaseWithBLOBs.setId(UUID.randomUUID().toString());
|
||||
apiTestCaseMapper.insert(apiTestCaseWithBLOBs);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue