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 c40fafc43b..7dcceffb35 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
@@ -119,16 +119,7 @@
LEFT JOIN project_version ON functional_case.version_id = project_version.id
where functional_case.deleted = #{deleted}
and functional_case.project_id = #{request.projectId}
-
-
- AND
-
-
- and (
-
- )
-
-
+
AND functional_case.id not in (
select case_review_functional_case.case_id from case_review_functional_case where case_review_functional_case.review_id = #{request.reviewId}
@@ -170,28 +161,78 @@
- functional_case.module_id in
+ and functional_case.module_id in
#{moduleId}
-
-
-
-
- (
+
+ and (
functional_case.name like concat('%', #{request.keyword},'%')
or functional_case.num like concat('%', #{request.keyword},'%')
or JSON_CONTAINS(tags, concat('["',#{request.keyword},'"]'))
)
-
-
-
-
+
+
+ AND
+
+
+ and (
+
+ )
+
+
+
+
+
+
+
+
+
+
+
+
+
+ and functional_case.review_status in
+
+
+
+ and functional_case.last_execute_result in
+
+
+
+ and functional_case.version_id in
+
+
+
+ and functional_case.id in (
+ select resource_id from custom_field_test_case where concat('custom_single-',field_id) =
+ #{key}
+ and trim(both '"' from `value`) in
+
+ )
+
+
+ and functional_case.id in (
+ select resource_id from custom_field_test_case where concat('custom_multiple-',field_id) =
+ #{key}
+ and JSON_CONTAINS(`value`, json_array(#{value}))
+
+
+ and functional_case.create_user in
+
+
+
+
+
+
+
+
+
@@ -204,71 +245,12 @@
-
-
-
+ 1=1
-
-
-
-
-
-
- functional_case.review_status in
-
-
-
-
-
-
- functional_case.last_execute_result in
-
-
-
-
-
-
- functional_case.version_id in
-
-
-
-
-
-
- test_case.id in (
- select resource_id from custom_field_test_case where concat('custom_single-',field_id) =
- #{key}
- and trim(both '"' from `value`) in
-
- )
-
-
-
-
-
- test_case.id in (
- select resource_id from custom_field_test_case where concat('custom_multiple-',field_id) =
- #{key}
- and JSON_CONTAINS(`value`, json_array(#{value}))
-
-
-
-
-
- functional_case.create_user in
-
-
-
-
-
-
-
-
-
-
+
functional_case.name
@@ -278,6 +260,7 @@
+
functional_case.num
@@ -287,6 +270,63 @@
+
+
+ functional_case.moduleId
+
+
+
+
+
+
+
+
+
+ functional_case.create_user
+
+
+
+
+
+
+
+
+
+ functional_case.create_time
+
+
+
+
+
+
+
+
+
+ functional_case.update_user
+
+
+
+
+
+
+
+
+
+ functional_case.update_time
+
+
+
+
+
+
+
+
+
+
+
+
+
+
functional_case.id ${custom.operator} (
@@ -340,24 +380,14 @@
- ${versionTable}.version_id = #{request.versionId}
-
-
-
+ and ${versionTable}.version_id = #{request.versionId}
- ${versionTable}.ref_id = #{request.refId}
-
-
-
+ and ${versionTable}.ref_id = #{request.refId}
- ${versionTable}.latest = 1
-
-
-
+ and ${versionTable}.latest = 1
- 1 = 1
@@ -432,6 +462,16 @@
+
+
+
+ 1 = 1
+
+
+ 1 = 2
+
+
+
@@ -444,6 +484,37 @@
+
+
+
+ (
+ functional_case.tags is null or functional_case.tags = '[]' or
+
+ !JSON_CONTAINS(functional_case.tags, JSON_ARRAY(#{tag}))
+
+ )
+
+
+
+
+
+
+
+ JSON_CONTAINS(functional_case.tags, JSON_ARRAY(#{tag}))
+
+
+
+
+
+
+
+ (functional_case.tags is null or functional_case.tags = '[]')
+
+
+
+
+
+
@@ -615,16 +683,7 @@
FROM functional_case
WHERE deleted = #{deleted}
AND project_id = #{request.projectId}
-
-
- AND
-
-
- and (
-
- )
-
-
+