From 3f87ec4f325dec12f7dce26adc97b6684481d2cb Mon Sep 17 00:00:00 2001 From: guoyuqi Date: Thu, 19 Sep 2024 17:21:07 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92):=20?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=B5=8B=E8=AF=95=E9=9B=86=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E7=94=A8=E4=BE=8B=E8=84=91=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../FunctionalCaseMinderController.java | 8 +++ .../mapper/ExtFunctionalCaseMapper.java | 5 +- .../mapper/ExtFunctionalCaseMapper.xml | 57 +++++++++++++++ .../FunctionalCaseCollectionMindRequest.java | 27 ++++++++ .../service/FunctionalCaseMinderService.java | 35 +++++++--- .../FunctionalCaseMinderControllerTest.java | 69 +++++++++++++++++++ 6 files changed, 189 insertions(+), 12 deletions(-) create mode 100644 backend/services/case-management/src/main/java/io/metersphere/functional/request/FunctionalCaseCollectionMindRequest.java diff --git a/backend/services/case-management/src/main/java/io/metersphere/functional/controller/FunctionalCaseMinderController.java b/backend/services/case-management/src/main/java/io/metersphere/functional/controller/FunctionalCaseMinderController.java index 4b478f99d4..38f1418b0b 100644 --- a/backend/services/case-management/src/main/java/io/metersphere/functional/controller/FunctionalCaseMinderController.java +++ b/backend/services/case-management/src/main/java/io/metersphere/functional/controller/FunctionalCaseMinderController.java @@ -86,4 +86,12 @@ public class FunctionalCaseMinderController { return PageUtils.setPageInfo(page, functionalCaseMinderService.getPlanMindFunctionalCase(request, false)); } + @PostMapping("/collection/list") + @Operation(summary = "测试集-功能用例-脑图用例跟根据测试集ID查询列表") + @RequiresPermissions(PermissionConstants.FUNCTIONAL_CASE_READ_MINDER) + @CheckOwner(resourceId = "#request.getProjectId()", resourceType = "project") + public Pager> getCollectionFunctionalCaseMinderTree(@Validated @RequestBody FunctionalCaseCollectionMindRequest request) { Page page = PageHelper.startPage(request.getCurrent(), 100 ); + return PageUtils.setPageInfo(page, functionalCaseMinderService.getCollectionMindFunctionalCase(request, false)); + } + } diff --git a/backend/services/case-management/src/main/java/io/metersphere/functional/mapper/ExtFunctionalCaseMapper.java b/backend/services/case-management/src/main/java/io/metersphere/functional/mapper/ExtFunctionalCaseMapper.java index 8752c2d39b..21fdaf0622 100644 --- a/backend/services/case-management/src/main/java/io/metersphere/functional/mapper/ExtFunctionalCaseMapper.java +++ b/backend/services/case-management/src/main/java/io/metersphere/functional/mapper/ExtFunctionalCaseMapper.java @@ -96,7 +96,7 @@ public interface ExtFunctionalCaseMapper { List getCaseCustomFieldList(@Param("request") FunctionalCaseMindRequest request, @Param("deleted") boolean deleted, @Param("fieldIds") List fieldIds); - + List getCaseCustomFieldListByCollection(@Param("request") FunctionalCaseCollectionMindRequest request, @Param("deleted") boolean deleted, @Param("fieldIds") List fieldIds); /** * 根据模块ID获取用例评审脑图展示数据 */ @@ -104,6 +104,9 @@ public interface ExtFunctionalCaseMapper { List getMinderTestPlanList(@Param("request") FunctionalCasePlanMindRequest request, @Param("deleted") boolean delete); + List getMinderCollectionList(@Param("request") FunctionalCaseCollectionMindRequest request, @Param("deleted") boolean delete); + + List selectBaseMindNodeByProjectId(@Param("projectId") String projectId); List selectAllFunctionalCase(@Param("isRepeat") boolean isRepeat, @Param("projectId") String projectId, @Param("testPlanId") String testPlanId); diff --git a/backend/services/case-management/src/main/java/io/metersphere/functional/mapper/ExtFunctionalCaseMapper.xml b/backend/services/case-management/src/main/java/io/metersphere/functional/mapper/ExtFunctionalCaseMapper.xml index 5b030e0ca4..17d55b1f92 100644 --- a/backend/services/case-management/src/main/java/io/metersphere/functional/mapper/ExtFunctionalCaseMapper.xml +++ b/backend/services/case-management/src/main/java/io/metersphere/functional/mapper/ExtFunctionalCaseMapper.xml @@ -690,6 +690,35 @@ order by fc.pos desc + + + +