fix(接口测试): 修复接口导入ESB文件保存数据不全问题

--user=郭雨琦
--bug=1015178
https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001015178
This commit is contained in:
guoyuqi 2022-07-29 16:42:29 +08:00 committed by f2c-ci-robot[bot]
parent 43f37853d0
commit 02a1439aec
1 changed files with 2 additions and 2 deletions

View File

@ -1741,7 +1741,7 @@ public class ApiDefinitionService {
sqlSession.flushStatements();
}
}
sqlSession.flushStatements();
//判断EsbData是否需要存储
if (apiImport.getEsbApiParamsMap() != null && apiImport.getEsbApiParamsMap().size() > 0) {
EsbApiParamsMapper esbApiParamsMapper = sqlSession.getMapper(EsbApiParamsMapper.class);
@ -1762,7 +1762,7 @@ public class ApiDefinitionService {
MockConfigService mockConfigService = CommonBeanFactory.getBean(MockConfigService.class);
mockConfigService.importMock(apiImport, sqlSession, request);
}
sqlSession.flushStatements();
if (sqlSession != null && sqlSessionFactory != null) {
SqlSessionUtils.closeSqlSession(sqlSession, sqlSessionFactory);
}