refactor: 接口导入到选中模块
This commit is contained in:
parent
0f5da509cf
commit
cd3e68ab4d
|
@ -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<ApiDefinitionResult> 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();
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
:is-read-only="isReadOnly"
|
||||
@exportAPI="exportAPI"
|
||||
@saveAsEdit="saveAsEdit"
|
||||
@refreshTable="$emit('refreshTable')"
|
||||
@refresh="refresh"
|
||||
@debug="debug"/>
|
||||
</template>
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
@saveAsEdit="saveAsEdit"
|
||||
@refresh="refresh"
|
||||
ref="basisApi"/>
|
||||
<api-import ref="apiImport" @refresh="refresh"/>
|
||||
<api-import ref="apiImport" @refresh="$emit('refreshTable')"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
Loading…
Reference in New Issue