fix(接口定义): 修复接口定义保存报错的缺陷 (#18257)

--bug=1017298 --user=王孝刚 【接口测试】【特殊数据】编辑接口定义报错了
https://www.tapd.cn/55049933/s/1252043

Co-authored-by: wxg0103 <727495428@qq.com>
This commit is contained in:
MeterSphere Bot 2022-09-26 16:01:16 +08:00 committed by GitHub
parent 8452d2c486
commit 5a1e8d4ec2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -867,6 +867,9 @@ public class ApiTestCaseService {
apiDefinitionExample.createCriteria().andApiDefinitionIdIn(ids); apiDefinitionExample.createCriteria().andApiDefinitionIdIn(ids);
List<ApiTestCaseWithBLOBs> caseWithBLOBs = apiTestCaseMapper.selectByExampleWithBLOBs(apiDefinitionExample); List<ApiTestCaseWithBLOBs> caseWithBLOBs = apiTestCaseMapper.selectByExampleWithBLOBs(apiDefinitionExample);
List<String> caseIds = caseWithBLOBs.stream().map(ApiTestCaseWithBLOBs::getId).collect(Collectors.toList()); List<String> caseIds = caseWithBLOBs.stream().map(ApiTestCaseWithBLOBs::getId).collect(Collectors.toList());
if (CollectionUtils.isEmpty(caseIds)) {
return;
}
List<ApiTestCaseWithBLOBs> bloBs = extApiTestCaseMapper.unTrashCaseListByIds(caseIds); List<ApiTestCaseWithBLOBs> bloBs = extApiTestCaseMapper.unTrashCaseListByIds(caseIds);
SqlSession sqlSession = sqlSessionFactory.openSession(ExecutorType.BATCH); SqlSession sqlSession = sqlSessionFactory.openSession(ExecutorType.BATCH);