fix(接口测试): 解决接口API点击保存一键同步功能导致接口case参数无法新增和覆盖问题

--user=郭雨琦
https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001016876
This commit is contained in:
guoyuqi 2022-09-21 16:09:00 +08:00 committed by xiaomeinvG
parent ef62ddec2c
commit 1d8d829f12
2 changed files with 5 additions and 2 deletions

View File

@ -865,7 +865,10 @@ public class ApiTestCaseService {
if ((StringUtils.isNotEmpty(method) || StringUtils.isNotEmpty(path) && RequestType.HTTP.equals(protocol))) { if ((StringUtils.isNotEmpty(method) || StringUtils.isNotEmpty(path) && RequestType.HTTP.equals(protocol))) {
ApiTestCaseExample apiDefinitionExample = new ApiTestCaseExample(); ApiTestCaseExample apiDefinitionExample = new ApiTestCaseExample();
apiDefinitionExample.createCriteria().andApiDefinitionIdIn(ids); apiDefinitionExample.createCriteria().andApiDefinitionIdIn(ids);
List<ApiTestCaseWithBLOBs> bloBs = apiTestCaseMapper.selectByExampleWithBLOBs(apiDefinitionExample); List<ApiTestCaseWithBLOBs> caseWithBLOBs = apiTestCaseMapper.selectByExampleWithBLOBs(apiDefinitionExample);
List<String> caseIds = caseWithBLOBs.stream().map(ApiTestCaseWithBLOBs::getId).collect(Collectors.toList());
List<ApiTestCaseWithBLOBs> bloBs = extApiTestCaseMapper.unTrashCaseListByIds(caseIds);
SqlSession sqlSession = sqlSessionFactory.openSession(ExecutorType.BATCH); SqlSession sqlSession = sqlSessionFactory.openSession(ExecutorType.BATCH);
ApiTestCaseMapper batchMapper = sqlSession.getMapper(ApiTestCaseMapper.class); ApiTestCaseMapper batchMapper = sqlSession.getMapper(ApiTestCaseMapper.class);

View File

@ -670,7 +670,7 @@ export default {
this.clickCase(response.data) this.clickCase(response.data)
} }
} else { } else {
this.$error("接口用例场景场景已经被删除"); this.$error("接口用例已经被删除");
} }
}); });
} }