fix(接口测试): 解决postman_har_jemeter接口用例场景导入没有用例等级问题

--user=郭雨琦
--bug=1014870
https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001014870
This commit is contained in:
guoyuqi 2022-07-19 19:51:11 +08:00 committed by xiaomeinvG
parent a4ee5648af
commit a0c5e78950
2 changed files with 7 additions and 0 deletions

View File

@ -1439,6 +1439,9 @@ public class ApiAutomationService {
if (item.getVersionId() == null || (!item.getVersionId().equals("new") && !item.getVersionId().equals("update"))) {
item.setNum(num);
}
if (StringUtils.isBlank(item.getLevel())) {
item.setLevel("P0");
}
if (BooleanUtils.isFalse(request.getOpenCustomNum())) {
// 如果未开启即使有自定值也直接覆盖
item.setCustomNum(String.valueOf(num));

View File

@ -902,6 +902,10 @@ public class ApiDefinitionService {
apiTestCaseWithBLOBs.setToBeUpdateTime(apiDefinition.getToBeUpdateTime());
}
if (StringUtils.isBlank(apiTestCaseWithBLOBs.getPriority())) {
apiTestCaseWithBLOBs.setPriority("P0");
}
if (StringUtils.isNotBlank(apiTestCaseWithBLOBs.getId())) {
apiTestCaseMapper.updateByPrimaryKeyWithBLOBs(apiTestCaseWithBLOBs);
} else {