From 5ad5d1c702a27fe97a968ab6b74e680bee8a411f Mon Sep 17 00:00:00 2001 From: wenyann <64353056+wenyann@users.noreply.github.com> Date: Fri, 29 Jan 2021 11:50:41 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=A9=BA=E6=8C=87=E9=92=88=E5=BC=82?= =?UTF-8?q?=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/metersphere/api/service/ApiDefinitionService.java | 5 ++++- .../api/definition/components/import/ApiImport.vue | 4 ++-- .../src/business/components/settings/system/Organization.vue | 3 --- 3 files changed, 6 insertions(+), 6 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 022a7f36d3..6160fa7f57 100644 --- a/backend/src/main/java/io/metersphere/api/service/ApiDefinitionService.java +++ b/backend/src/main/java/io/metersphere/api/service/ApiDefinitionService.java @@ -661,7 +661,10 @@ public class ApiDefinitionService { public String getResourceId(SwaggerUrlRequest swaggerUrlRequest) { SwaggerUrlProjectExample swaggerUrlProjectExample = new SwaggerUrlProjectExample(); SwaggerUrlProjectExample.Criteria criteria = swaggerUrlProjectExample.createCriteria(); - criteria.andProjectIdEqualTo(swaggerUrlRequest.getProjectId()).andSwaggerUrlEqualTo(swaggerUrlRequest.getSwaggerUrl()).andModuleIdEqualTo(swaggerUrlRequest.getModuleId()); + criteria.andProjectIdEqualTo(swaggerUrlRequest.getProjectId()).andSwaggerUrlEqualTo(swaggerUrlRequest.getSwaggerUrl()); + if (StringUtils.isNotBlank(swaggerUrlRequest.getModuleId())) { + criteria.andModuleIdEqualTo(swaggerUrlRequest.getModuleId()); + } List list = swaggerUrlProjectMapper.selectByExample(swaggerUrlProjectExample); String resourceId = ""; if (list.size() == 1) { diff --git a/frontend/src/business/components/api/definition/components/import/ApiImport.vue b/frontend/src/business/components/api/definition/components/import/ApiImport.vue index 005ad19883..82fb716e25 100644 --- a/frontend/src/business/components/api/definition/components/import/ApiImport.vue +++ b/frontend/src/business/components/api/definition/components/import/ApiImport.vue @@ -117,7 +117,7 @@ export default { }, { id: 'incrementalMerge', - name: this.$t('commons.not.cover') + name: this.$t('commons.not_cover') }], protocol: "", platforms: [ @@ -152,7 +152,7 @@ export default { formData: { file: undefined, swaggerUrl: '', - modeId: this.$t('commons.not.cover'), + modeId: this.$t('commons.not_cover'), moduleId: '', }, rules: {}, diff --git a/frontend/src/business/components/settings/system/Organization.vue b/frontend/src/business/components/settings/system/Organization.vue index 8fc66f3284..888236af0f 100644 --- a/frontend/src/business/components/settings/system/Organization.vue +++ b/frontend/src/business/components/settings/system/Organization.vue @@ -252,9 +252,6 @@ export default { activated() { this.initTableData(); }, - created() { - this.list() - }, methods: { create() { this.dialogOrgAddVisible = true;