fix: 修复接口定义导入时的问题

--bug=1009806 --user=刘瑞斌 【接口测试】接口定义,postman覆盖导入报错 https://www.tapd.cn/55049933/s/1095076
This commit is contained in:
CaptainB 2022-01-20 16:50:52 +08:00 committed by 刘瑞斌
parent 27f1ffce5c
commit d8247a4fc3
2 changed files with 2 additions and 0 deletions

View File

@ -1211,6 +1211,7 @@ public class ApiAutomationService {
scenarioWithBLOBs.setRefId(sameRequest.get(0).getRefId());
scenarioWithBLOBs.setVersionId(apiTestImportRequest.getUpdateVersionId());
scenarioWithBLOBs.setNum(sameRequest.get(0).getNum()); // 使用第一个num当作本次的num
scenarioWithBLOBs.setOrder(sameRequest.get(0).getOrder());
batchMapper.insert(scenarioWithBLOBs);
} else {
ApiScenarioWithBLOBs existScenario = scenarioOp.get();

View File

@ -788,6 +788,7 @@ public class ApiDefinitionService {
apiDefinition.setRefId(sameRequest.get(0).getRefId());
apiDefinition.setVersionId(apiTestImportRequest.getUpdateVersionId());
apiDefinition.setNum(sameRequest.get(0).getNum()); // 使用第一个num当作本次的num
apiDefinition.setOrder(sameRequest.get(0).getOrder());
batchMapper.insert(apiDefinition);
} else {
ApiDefinition existApi = apiOp.get();