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 06ed0e92da..c5e699704d 100644 --- a/backend/src/main/java/io/metersphere/api/service/ApiDefinitionService.java +++ b/backend/src/main/java/io/metersphere/api/service/ApiDefinitionService.java @@ -369,7 +369,7 @@ public class ApiDefinitionService { return apiImport; } - private void importApiTest(ApiTestImportRequest importRequest, ApiDefinitionImport apiImport) { + private void importApiTest(ApiTestImportRequest request, ApiDefinitionImport apiImport) { SqlSession sqlSession = sqlSessionFactory.openSession(ExecutorType.BATCH); ApiDefinitionMapper batchMapper = sqlSession.getMapper(ApiDefinitionMapper.class); List data = apiImport.getData(); @@ -378,6 +378,7 @@ public class ApiDefinitionService { if (item.getName().length() > 255) { item.setName(item.getName().substring(0, 255)); } + item.setModuleId(request.getModuleId()); createTest(item, batchMapper); if (i % 300 == 0) { sqlSession.flushStatements(); diff --git a/frontend/src/business/components/api/definition/components/module/ApiModule.vue b/frontend/src/business/components/api/definition/components/module/ApiModule.vue index 3fa76942ec..fb00c0da36 100644 --- a/frontend/src/business/components/api/definition/components/module/ApiModule.vue +++ b/frontend/src/business/components/api/definition/components/module/ApiModule.vue @@ -21,6 +21,7 @@ :is-read-only="isReadOnly" @exportAPI="exportAPI" @saveAsEdit="saveAsEdit" + @refreshTable="$emit('refreshTable')" @refresh="refresh" @debug="debug"/> diff --git a/frontend/src/business/components/api/definition/components/module/ApiModuleHeader.vue b/frontend/src/business/components/api/definition/components/module/ApiModuleHeader.vue index c799cefb4c..19ef14456d 100644 --- a/frontend/src/business/components/api/definition/components/module/ApiModuleHeader.vue +++ b/frontend/src/business/components/api/definition/components/module/ApiModuleHeader.vue @@ -33,7 +33,7 @@ @saveAsEdit="saveAsEdit" @refresh="refresh" ref="basisApi"/> - +