diff --git a/backend/framework/plugin/plugin-platform-sdk/src/main/java/io/metersphere/plugin/platform/dto/reponse/DemandDTO.java b/backend/framework/plugin/plugin-platform-sdk/src/main/java/io/metersphere/plugin/platform/dto/reponse/DemandDTO.java deleted file mode 100644 index 7c387d8098..0000000000 --- a/backend/framework/plugin/plugin-platform-sdk/src/main/java/io/metersphere/plugin/platform/dto/reponse/DemandDTO.java +++ /dev/null @@ -1,15 +0,0 @@ -package io.metersphere.plugin.platform.dto.reponse; - -import lombok.Data; - -@Data -public class DemandDTO { - /** - * ID - */ - protected String id; - /** - * 名称 - */ - protected String name; -} diff --git a/backend/framework/plugin/plugin-platform-sdk/src/main/java/io/metersphere/plugin/platform/dto/reponse/DemandRelatePageResponse.java b/backend/framework/plugin/plugin-platform-sdk/src/main/java/io/metersphere/plugin/platform/dto/reponse/DemandRelatePageResponse.java new file mode 100644 index 0000000000..8e18b13e37 --- /dev/null +++ b/backend/framework/plugin/plugin-platform-sdk/src/main/java/io/metersphere/plugin/platform/dto/reponse/DemandRelatePageResponse.java @@ -0,0 +1,43 @@ +package io.metersphere.plugin.platform.dto.reponse; + +import lombok.Data; + +import java.util.List; +import java.util.Map; + +@Data +public class DemandRelatePageResponse { + + /** + * 自定义表头字段 + */ + private Map customHeaderMap; + /** + * 需求列表数据 + */ + private List demandList; + + @Data + public static class Demand { + /** + * 需求ID + */ + private String demandId; + /** + * 父需求ID + */ + private String parent; + /** + * 需求名称/标题 + */ + private String demandName; + /** + * 需求地址 + */ + private String demandUrl; + /** + * 自定义字段 + */ + private Map customFields; + } +} diff --git a/backend/framework/plugin/plugin-platform-sdk/src/main/java/io/metersphere/plugin/platform/dto/request/DemandPageRequest.java b/backend/framework/plugin/plugin-platform-sdk/src/main/java/io/metersphere/plugin/platform/dto/request/DemandPageRequest.java index e108c718c1..5d67e6bd2a 100644 --- a/backend/framework/plugin/plugin-platform-sdk/src/main/java/io/metersphere/plugin/platform/dto/request/DemandPageRequest.java +++ b/backend/framework/plugin/plugin-platform-sdk/src/main/java/io/metersphere/plugin/platform/dto/request/DemandPageRequest.java @@ -2,6 +2,8 @@ package io.metersphere.plugin.platform.dto.request; import lombok.Data; +import java.util.Map; + @Data public class DemandPageRequest { @@ -15,6 +17,11 @@ public class DemandPageRequest { */ private String query; + /** + * 筛选条件 + */ + private Map filter; + /** * 开始页码 */ diff --git a/backend/framework/plugin/plugin-platform-sdk/src/main/java/io/metersphere/plugin/platform/spi/Platform.java b/backend/framework/plugin/plugin-platform-sdk/src/main/java/io/metersphere/plugin/platform/spi/Platform.java index 70aa73e914..8660f7ccdc 100644 --- a/backend/framework/plugin/plugin-platform-sdk/src/main/java/io/metersphere/plugin/platform/spi/Platform.java +++ b/backend/framework/plugin/plugin-platform-sdk/src/main/java/io/metersphere/plugin/platform/spi/Platform.java @@ -2,7 +2,7 @@ package io.metersphere.plugin.platform.spi; import io.metersphere.plugin.platform.dto.SelectOption; import io.metersphere.plugin.platform.dto.SyncBugResult; -import io.metersphere.plugin.platform.dto.reponse.DemandDTO; +import io.metersphere.plugin.platform.dto.reponse.DemandRelatePageResponse; import io.metersphere.plugin.platform.dto.reponse.PlatformBugUpdateDTO; import io.metersphere.plugin.platform.dto.reponse.PlatformCustomFieldItemDTO; import io.metersphere.plugin.platform.dto.request.*; @@ -70,19 +70,11 @@ public interface Platform extends ExtensionPoint { List getStatusTransitions(String projectConfig, String issueKey); /** - * 获取第三方平台需求 + * 获取第三方平台关联需求列表 * @param request 需求分页查询参数 * @return 需求分页数据 */ - PluginPager> pageDemand(DemandPageRequest request); - - /** - * 获取第三方平台已关联的需求集合 - * @param request 查询请求参数 - * @return 需求数据集合 - */ - List getDemands(DemandRelateQueryRequest request); - + PluginPager pageDemand(DemandPageRequest request); /** * 新增平台缺陷 @@ -131,6 +123,8 @@ public interface Platform extends ExtensionPoint { /** * 同步全量缺陷 + * + * @param request 同步缺陷参数 */ void syncAllBugs(SyncAllBugRequest request);