fix(接口测试): 用例导入报错
--user=郭雨琦 --bug=1014790 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001014790
This commit is contained in:
parent
c6061fdd6f
commit
8f51d10389
|
@ -829,18 +829,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