From eee4da5c6023fe3ae385844ae710e7daae5dcc26 Mon Sep 17 00:00:00 2001 From: guoyuqi Date: Fri, 29 Jul 2022 16:42:29 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=8E=A5=E5=8F=A3=E5=AF=BC=E5=85=A5ESB?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E4=BF=9D=E5=AD=98=E6=95=B0=E6=8D=AE=E4=B8=8D?= =?UTF-8?q?=E5=85=A8=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --user=郭雨琦 --bug=1015178 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001015178 --- .../java/io/metersphere/api/service/ApiDefinitionService.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/src/main/java/io/metersphere/api/service/ApiDefinitionService.java b/backend/src/main/java/io/metersphere/api/service/ApiDefinitionService.java index 79b3128db1..2e29deee3d 100644 --- a/backend/src/main/java/io/metersphere/api/service/ApiDefinitionService.java +++ b/backend/src/main/java/io/metersphere/api/service/ApiDefinitionService.java @@ -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); }