From 3781f725236756dcbf956dc83f8d85206110f3e9 Mon Sep 17 00:00:00 2001
From: AgAngle <1323481023@qq.com>
Date: Fri, 6 Sep 2024 22:03:25 +0800
Subject: [PATCH] =?UTF-8?q?feat(=E5=8A=9F=E8=83=BD=E7=94=A8=E4=BE=8B):=20?=
=?UTF-8?q?=E8=AF=84=E5=AE=A1=E8=AF=A6=E6=83=85=E9=A1=B5=E9=9D=A2=E9=AB=98?=
=?UTF-8?q?=E7=BA=A7=E6=90=9C=E7=B4=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
--task=1016128 --user=陈建星 高级搜索-视图增删改查-后端 https://www.tapd.cn/55049933/s/1573254
---
.../api/mapper/ExtApiDefinitionMapper.xml | 1 +
.../ExtCaseReviewFunctionalCaseMapper.java | 8 +-
.../ExtCaseReviewFunctionalCaseMapper.xml | 250 ++++++++----------
.../mapper/ExtFunctionalCaseMapper.xml | 1 +
...seReviewFunctionalCaseControllerTests.java | 40 ++-
.../FunctionalCaseControllerTests.java | 4 +-
.../metersphere/system/mapper/BaseMapper.xml | 18 +-
7 files changed, 149 insertions(+), 173 deletions(-)
diff --git a/backend/services/api-test/src/main/java/io/metersphere/api/mapper/ExtApiDefinitionMapper.xml b/backend/services/api-test/src/main/java/io/metersphere/api/mapper/ExtApiDefinitionMapper.xml
index 951839f7d4..9800b3360d 100644
--- a/backend/services/api-test/src/main/java/io/metersphere/api/mapper/ExtApiDefinitionMapper.xml
+++ b/backend/services/api-test/src/main/java/io/metersphere/api/mapper/ExtApiDefinitionMapper.xml
@@ -423,6 +423,7 @@
select api_id from api_definition_custom_field where
+
)
diff --git a/backend/services/case-management/src/main/java/io/metersphere/functional/mapper/ExtCaseReviewFunctionalCaseMapper.java b/backend/services/case-management/src/main/java/io/metersphere/functional/mapper/ExtCaseReviewFunctionalCaseMapper.java
index a6a47037eb..c1b72373fc 100644
--- a/backend/services/case-management/src/main/java/io/metersphere/functional/mapper/ExtCaseReviewFunctionalCaseMapper.java
+++ b/backend/services/case-management/src/main/java/io/metersphere/functional/mapper/ExtCaseReviewFunctionalCaseMapper.java
@@ -7,6 +7,7 @@ import io.metersphere.functional.dto.ReviewFunctionalCaseDTO;
import io.metersphere.functional.request.BaseReviewCaseBatchRequest;
import io.metersphere.functional.request.FunctionalCaseReviewListRequest;
import io.metersphere.functional.request.ReviewFunctionalCasePageRequest;
+import io.metersphere.system.interceptor.BaseConditionFilter;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@@ -15,13 +16,14 @@ import java.util.List;
* @author guoyuqi
*/
public interface ExtCaseReviewFunctionalCaseMapper {
-
+ @BaseConditionFilter
List list(@Param("request") FunctionalCaseReviewListRequest request);
void updateStatus(@Param("caseId") String caseId, @Param("reviewId") String reviewId, @Param("status") String status);
List getCaseIdsByReviewId(@Param("reviewId") String reviewId);
+ @BaseConditionFilter
List page(@Param("request") ReviewFunctionalCasePageRequest request, @Param("deleted") boolean deleted, @Param("userId") String userId, @Param("sort") String sort);
Long getPos(@Param("reviewId") String reviewId);
@@ -30,8 +32,10 @@ public interface ExtCaseReviewFunctionalCaseMapper {
Long getLastPos(@Param("reviewId") String reviewId, @Param("basePos") Long basePos);
+ @BaseConditionFilter
List getIds(@Param("request") BaseReviewCaseBatchRequest request, @Param("userId") String userId, @Param("deleted") boolean deleted);
+ @BaseConditionFilter
List getListByRequest(@Param("request") BaseReviewCaseBatchRequest request, @Param("userId") String userId, @Param("deleted") boolean deleted);
List getList(@Param("reviewId") String reviewId, @Param("reviewIds") List reviewIds, @Param("deleted") boolean deleted);
@@ -41,8 +45,10 @@ public interface ExtCaseReviewFunctionalCaseMapper {
List getCaseIdsByIds(@Param("ids") List ids);
+ @BaseConditionFilter
List countModuleIdByRequest(@Param("request") ReviewFunctionalCasePageRequest request, @Param("deleted") boolean deleted, @Param("userId") String userId);
+ @BaseConditionFilter
long caseCount(@Param("request") ReviewFunctionalCasePageRequest request, @Param("deleted") boolean deleted, @Param("userId") String userId);
}
diff --git a/backend/services/case-management/src/main/java/io/metersphere/functional/mapper/ExtCaseReviewFunctionalCaseMapper.xml b/backend/services/case-management/src/main/java/io/metersphere/functional/mapper/ExtCaseReviewFunctionalCaseMapper.xml
index 1fca30f14d..edb88096be 100644
--- a/backend/services/case-management/src/main/java/io/metersphere/functional/mapper/ExtCaseReviewFunctionalCaseMapper.xml
+++ b/backend/services/case-management/src/main/java/io/metersphere/functional/mapper/ExtCaseReviewFunctionalCaseMapper.xml
@@ -84,17 +84,10 @@
-
-
- AND
-
-
-
- and (
-
- )
-
-
+
+
+
+
@@ -145,121 +138,111 @@
-
-
-
-
-
-
-
- 1=1
-
-
-
-
- functional_case.name
-
-
-
-
-
-
-
-
-
- functional_case.num
-
-
-
-
-
-
-
-
-
- functional_case.moduleId
-
-
-
-
-
-
-
-
-
- functional_case.create_user
-
-
-
-
-
-
-
-
-
- functional_case.create_time
-
-
-
-
-
-
-
-
-
- functional_case.update_user
-
-
-
-
-
-
-
-
-
- functional_case.update_time
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- functional_case.id ${custom.operator} (
- select case_id from functional_case_custom_field where field_id = #{custom.id}
-
-
- and JSON_CONTAINS(`value`, json_array(#{custom.value}))
-
-
- and `value`
+
+
+
+
+ functional_case.id in (
+ select case_id from functional_case_follower where
-
+
+
-
-
- and trim(both '"' from `value`)
+ )
+
+
+
+
+
+
+
-
+
+
-
-
- )
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ functional_case.id in (
+ select case_id from functional_case_demand where
+
+
+
+
+ )
+
+
+ functional_case.id in (
+ select case_id from functional_case_attachment where
+
+
+
+
+ )
+
+
+
+
+
+
+ functional_case.id in (
+ select case_id from functional_case_custom_field where
+
+
+
+
+ )
+
+
+
@@ -360,30 +343,11 @@
-
-
- AND
-
-
-
- and (
-
- )
-
-
+
+
+
-
-
-
-
-
-
-
- 1=1
-
-
-