From 3d54e2186deef9b00ba358a5839f2735a65ba7ff Mon Sep 17 00:00:00 2001 From: guoyuqi Date: Thu, 1 Feb 2024 20:15:59 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E7=94=A8=E4=BE=8B=E7=AE=A1=E7=90=86):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=94=A8=E4=BE=8B=E8=AF=84=E5=AE=A1=E8=AF=A6?= =?UTF-8?q?=E6=83=85=E6=A8=A1=E5=9D=97=E6=A0=91=E9=BB=98=E8=AE=A4=E8=8A=82?= =?UTF-8?q?=E7=82=B9=E7=9A=84=E6=9E=84=E9=80=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../functional/dto/ProjectOptionDTO.java | 16 ++++++++++++++++ .../mapper/ExtFunctionalCaseModuleMapper.java | 3 +++ .../mapper/ExtFunctionalCaseModuleMapper.xml | 9 +++++++++ .../service/CaseReviewFunctionalCaseService.java | 16 +++++++++++++--- .../CaseReviewFunctionalCaseControllerTests.java | 3 +++ .../dml/init_review_functional_case_test.sql | 14 ++++++++++---- 6 files changed, 54 insertions(+), 7 deletions(-) create mode 100644 backend/services/case-management/src/main/java/io/metersphere/functional/dto/ProjectOptionDTO.java diff --git a/backend/services/case-management/src/main/java/io/metersphere/functional/dto/ProjectOptionDTO.java b/backend/services/case-management/src/main/java/io/metersphere/functional/dto/ProjectOptionDTO.java new file mode 100644 index 0000000000..8dd8cddada --- /dev/null +++ b/backend/services/case-management/src/main/java/io/metersphere/functional/dto/ProjectOptionDTO.java @@ -0,0 +1,16 @@ +package io.metersphere.functional.dto; + +import io.metersphere.system.dto.sdk.OptionDTO; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@Data +@AllArgsConstructor +@NoArgsConstructor +public class ProjectOptionDTO extends OptionDTO { + + @Schema(description = "是否是默认模板") + private String projectName; +} diff --git a/backend/services/case-management/src/main/java/io/metersphere/functional/mapper/ExtFunctionalCaseModuleMapper.java b/backend/services/case-management/src/main/java/io/metersphere/functional/mapper/ExtFunctionalCaseModuleMapper.java index 55ded00a27..40c04c9421 100644 --- a/backend/services/case-management/src/main/java/io/metersphere/functional/mapper/ExtFunctionalCaseModuleMapper.java +++ b/backend/services/case-management/src/main/java/io/metersphere/functional/mapper/ExtFunctionalCaseModuleMapper.java @@ -1,6 +1,7 @@ package io.metersphere.functional.mapper; import io.metersphere.functional.dto.FunctionalCaseModuleDTO; +import io.metersphere.functional.dto.ProjectOptionDTO; import io.metersphere.project.dto.NodeSortQueryParam; import io.metersphere.request.AssociateCaseModuleRequest; import io.metersphere.system.dto.sdk.BaseModule; @@ -14,6 +15,8 @@ public interface ExtFunctionalCaseModuleMapper { List selectBaseByProjectIdAndReviewId(@Param("reviewId")String reviewId); + List selectFunRootIdByReviewId(@Param("reviewId")String reviewId); + List selectBaseByIds(@Param("ids") List ids); List selectChildrenIdsByParentIds(@Param("ids") List deleteIds); diff --git a/backend/services/case-management/src/main/java/io/metersphere/functional/mapper/ExtFunctionalCaseModuleMapper.xml b/backend/services/case-management/src/main/java/io/metersphere/functional/mapper/ExtFunctionalCaseModuleMapper.xml index 7bf20eef49..d95b95c0e0 100644 --- a/backend/services/case-management/src/main/java/io/metersphere/functional/mapper/ExtFunctionalCaseModuleMapper.xml +++ b/backend/services/case-management/src/main/java/io/metersphere/functional/mapper/ExtFunctionalCaseModuleMapper.xml @@ -7,6 +7,15 @@ WHERE project_id = #{projectId} ORDER BY pos +