From 90bbdc168a0a1a48a8d3a38cc1a5c266ca26363d Mon Sep 17 00:00:00 2001 From: chenjianxing Date: Fri, 9 Dec 2022 14:03:30 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA):=20?= =?UTF-8?q?=E7=A6=85=E9=81=93=E6=8F=92=E4=BB=B6=E5=8C=96=E6=94=B9=E9=80=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/BasePluginService.java | 15 + .../xpack/track/dto/IssuesDao.java | 2 - .../track/dto/request/IssuesRequest.java | 8 - .../dto/request/IssuesUpdateRequest.java | 9 - .../metersphere/utils/PluginManagerUtil.java | 3 + .../workspace/integration/BugManagement.vue | 5 +- .../workspace/integration/JiraSetting.vue | 229 ------ .../workspace/integration/ZentaoSetting.vue | 235 ------ .../base/mapper/ext/ExtIssuesMapper.xml | 2 +- .../controller/IssuesController.java | 17 +- .../metersphere/dto/ThirdPartIssueField.java | 18 + .../io/metersphere/service/IssuesService.java | 65 +- .../service/PlatformPluginService.java | 4 +- .../service/issue/client/ZentaoClient.java | 263 ------- .../service/issue/client/ZentaoGetClient.java | 65 -- .../issue/client/ZentaoPathInfoClient.java | 57 -- .../issue/domain/zentao/AddIssueResponse.java | 15 - .../zentao/GetCreateMetaDataResponse.java | 20 - .../issue/domain/zentao/GetIssueResponse.java | 23 - .../domain/zentao/GetSessionResponse.java | 18 - .../issue/domain/zentao/GetUserResponse.java | 19 - .../issue/domain/zentao/RequestUrl.java | 28 - .../issue/domain/zentao/ZentaoBuild.java | 16 - .../issue/domain/zentao/ZentaoConfig.java | 14 - .../issue/domain/zentao/ZentaoResponse.java | 12 - .../service/issue/platform/IssueFactory.java | 2 - .../service/issue/platform/ZentaoFactory.java | 18 - .../issue/platform/ZentaoPlatform.java | 692 ------------------ .../wapper/IssueProxyResourceService.java | 20 +- .../metersphere/utils/PluginManagerUtil.java | 3 + test-track/frontend/src/api/issue.js | 41 +- .../src/business/issue/IssueEditDetail.vue | 52 +- .../functional/FunctionalTestCaseEdit.vue | 9 - .../components/TestReviewTestCaseEdit.vue | 4 - 34 files changed, 125 insertions(+), 1878 deletions(-) delete mode 100644 system-setting/frontend/src/business/workspace/integration/JiraSetting.vue delete mode 100644 system-setting/frontend/src/business/workspace/integration/ZentaoSetting.vue create mode 100644 test-track/backend/src/main/java/io/metersphere/dto/ThirdPartIssueField.java delete mode 100644 test-track/backend/src/main/java/io/metersphere/service/issue/client/ZentaoClient.java delete mode 100644 test-track/backend/src/main/java/io/metersphere/service/issue/client/ZentaoGetClient.java delete mode 100644 test-track/backend/src/main/java/io/metersphere/service/issue/client/ZentaoPathInfoClient.java delete mode 100644 test-track/backend/src/main/java/io/metersphere/service/issue/domain/zentao/AddIssueResponse.java delete mode 100644 test-track/backend/src/main/java/io/metersphere/service/issue/domain/zentao/GetCreateMetaDataResponse.java delete mode 100644 test-track/backend/src/main/java/io/metersphere/service/issue/domain/zentao/GetIssueResponse.java delete mode 100644 test-track/backend/src/main/java/io/metersphere/service/issue/domain/zentao/GetSessionResponse.java delete mode 100644 test-track/backend/src/main/java/io/metersphere/service/issue/domain/zentao/GetUserResponse.java delete mode 100644 test-track/backend/src/main/java/io/metersphere/service/issue/domain/zentao/RequestUrl.java delete mode 100644 test-track/backend/src/main/java/io/metersphere/service/issue/domain/zentao/ZentaoBuild.java delete mode 100644 test-track/backend/src/main/java/io/metersphere/service/issue/domain/zentao/ZentaoConfig.java delete mode 100644 test-track/backend/src/main/java/io/metersphere/service/issue/domain/zentao/ZentaoResponse.java delete mode 100644 test-track/backend/src/main/java/io/metersphere/service/issue/platform/ZentaoFactory.java delete mode 100644 test-track/backend/src/main/java/io/metersphere/service/issue/platform/ZentaoPlatform.java diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/BasePluginService.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/BasePluginService.java index 0ea1cfe851..e12d7b4ffe 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/BasePluginService.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/BasePluginService.java @@ -6,6 +6,7 @@ import io.metersphere.base.mapper.PluginMapper; import io.metersphere.commons.constants.StorageConstants; import io.metersphere.metadata.service.FileManagerService; import io.metersphere.metadata.vo.FileRequest; +import org.apache.commons.collections.CollectionUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -28,6 +29,17 @@ public class BasePluginService { return pluginMapper.selectByExampleWithBLOBs(example); } + public PluginWithBLOBs get(String pluginId) { + return pluginMapper.selectByPrimaryKey(pluginId); + } + + public PluginWithBLOBs getByScripId(String scripId) { + PluginExample example = new PluginExample(); + example.createCriteria().andScriptIdEqualTo(scripId); + List plugins = pluginMapper.selectByExampleWithBLOBs(example); + return CollectionUtils.isEmpty(plugins) ? null : plugins.get(0); + } + public InputStream getPluginResource(String pluginId, String resourceName) { FileRequest request = new FileRequest(); request.setProjectId(DIR_PATH + "/" + pluginId); @@ -38,6 +50,9 @@ public class BasePluginService { public InputStream getPluginJar(String pluginId) { PluginWithBLOBs plugin = pluginMapper.selectByPrimaryKey(pluginId); + if (plugin == null) { + return null; + } return getPluginResource(pluginId, plugin.getSourceName()); } } diff --git a/framework/sdk-parent/xpack-interface/src/main/java/io/metersphere/xpack/track/dto/IssuesDao.java b/framework/sdk-parent/xpack-interface/src/main/java/io/metersphere/xpack/track/dto/IssuesDao.java index f68709c477..44408edc73 100644 --- a/framework/sdk-parent/xpack-interface/src/main/java/io/metersphere/xpack/track/dto/IssuesDao.java +++ b/framework/sdk-parent/xpack-interface/src/main/java/io/metersphere/xpack/track/dto/IssuesDao.java @@ -19,8 +19,6 @@ public class IssuesDao extends IssuesWithBLOBs { private List caseIds; private String caseId; private List tapdUsers; - private ListzentaoBuilds; - private String zentaoAssigned; private String refType; private String refId; private List fields; diff --git a/framework/sdk-parent/xpack-interface/src/main/java/io/metersphere/xpack/track/dto/request/IssuesRequest.java b/framework/sdk-parent/xpack-interface/src/main/java/io/metersphere/xpack/track/dto/request/IssuesRequest.java index cf087cf58a..d4622d04a6 100644 --- a/framework/sdk-parent/xpack-interface/src/main/java/io/metersphere/xpack/track/dto/request/IssuesRequest.java +++ b/framework/sdk-parent/xpack-interface/src/main/java/io/metersphere/xpack/track/dto/request/IssuesRequest.java @@ -21,14 +21,6 @@ public class IssuesRequest extends BaseQueryRequest { * 如果是 PLAN_FUNCTIONAL 则只查询该测试计划用例所关联的缺陷 */ private String refType; - /** - * zentao bug 处理人 - */ - private String zentaoUser; - /** - * zentao bug 影响版本 - */ - private List zentaoBuilds; /** * issues id diff --git a/framework/sdk-parent/xpack-interface/src/main/java/io/metersphere/xpack/track/dto/request/IssuesUpdateRequest.java b/framework/sdk-parent/xpack-interface/src/main/java/io/metersphere/xpack/track/dto/request/IssuesUpdateRequest.java index 6502e6abeb..829eccf2af 100644 --- a/framework/sdk-parent/xpack-interface/src/main/java/io/metersphere/xpack/track/dto/request/IssuesUpdateRequest.java +++ b/framework/sdk-parent/xpack-interface/src/main/java/io/metersphere/xpack/track/dto/request/IssuesUpdateRequest.java @@ -22,15 +22,6 @@ public class IssuesUpdateRequest extends IssuesWithBLOBs { private List addFields; private List editFields; private List requestFields; - /** - * zentao bug 处理人 - */ - private String zentaoUser; - private String zentaoAssigned; - /** - * zentao bug 影响版本 - */ - private List zentaoBuilds; private boolean thirdPartPlatform; private List follows; diff --git a/system-setting/backend/src/main/java/io/metersphere/utils/PluginManagerUtil.java b/system-setting/backend/src/main/java/io/metersphere/utils/PluginManagerUtil.java index 44f63179ad..ff9f5a4fc8 100644 --- a/system-setting/backend/src/main/java/io/metersphere/utils/PluginManagerUtil.java +++ b/system-setting/backend/src/main/java/io/metersphere/utils/PluginManagerUtil.java @@ -55,6 +55,9 @@ public class PluginManagerUtil { * @param pluginManager */ public static void loadPlugin(String id, PluginManager pluginManager, InputStream inputStream) { + if (inputStream == null) { + return; + } if (pluginManager == null) { pluginManager = new PluginManager(); } diff --git a/system-setting/frontend/src/business/workspace/integration/BugManagement.vue b/system-setting/frontend/src/business/workspace/integration/BugManagement.vue index f39e55c234..84e1d50808 100644 --- a/system-setting/frontend/src/business/workspace/integration/BugManagement.vue +++ b/system-setting/frontend/src/business/workspace/integration/BugManagement.vue @@ -31,15 +31,14 @@ - - diff --git a/system-setting/frontend/src/business/workspace/integration/ZentaoSetting.vue b/system-setting/frontend/src/business/workspace/integration/ZentaoSetting.vue deleted file mode 100644 index e298bf01b5..0000000000 --- a/system-setting/frontend/src/business/workspace/integration/ZentaoSetting.vue +++ /dev/null @@ -1,235 +0,0 @@ - - - - - diff --git a/test-track/backend/src/main/java/io/metersphere/base/mapper/ext/ExtIssuesMapper.xml b/test-track/backend/src/main/java/io/metersphere/base/mapper/ext/ExtIssuesMapper.xml index eefc535b2e..f33857437f 100644 --- a/test-track/backend/src/main/java/io/metersphere/base/mapper/ext/ExtIssuesMapper.xml +++ b/test-track/backend/src/main/java/io/metersphere/base/mapper/ext/ExtIssuesMapper.xml @@ -152,7 +152,7 @@ when 'textarea' then cfi.text_value else cfi.value end as value from custom_field_issues cfi - join custom_field cf on cf.id = cfi.field_id + left join custom_field cf on cf.id = cfi.field_id where cfi.resource_id = #{issueId}