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 bdee8037de..860e8b7931 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
@@ -35,7 +35,7 @@
crfc.case_id as caseId,
crfc.`status` as status,
crfc.create_time as createTime,
- crfc.create_user as createUser,
+ functional_case.create_user as createUser,
user.name as createUserName,
functional_case.version_id as versionId,
functional_case.module_id as moduleId,
@@ -45,23 +45,14 @@
FROM
case_review_functional_case crfc
LEFT JOIN functional_case ON crfc.case_id = functional_case.id
- LEFT JOIN user ON crfc.create_user = user.id
+ LEFT JOIN user ON functional_case.create_user = user.id
WHERE
review_id = #{request.reviewId}
AND functional_case.deleted = #{deleted}
AND crfc.case_id in (select case_id from case_review_functional_case_user crfcu where crfcu.review_id = #{request.reviewId} and crfcu.user_id = #{userId})
-
-
- AND
-
-
- and (
-
- )
-
-
+
order by
functional_case.${sort}
@@ -75,35 +66,31 @@
- 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},'"]'))
)
-
-
-
-
-
-
-
-
-
-
- 1=1
+
+
+ AND
+
+
+ and (
+
+ )
+
+
@@ -113,52 +100,34 @@
- crfc.status in
+ and crfc.status in
-
-
-
- functional_case.last_execute_result in
+ and functional_case.last_execute_result in
-
-
-
- functional_case.version_id in
+ and functional_case.version_id in
-
-
-
- test_case.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
)
-
-
-
- test_case.id 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}))
-
-
-
- functional_case.create_user in
+ and functional_case.create_user in
-
-
-
@@ -166,7 +135,18 @@
+
+
+
+
+
+
+
+ 1=1
+
+
+
functional_case.name
@@ -176,6 +156,7 @@
+
functional_case.num
@@ -185,6 +166,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} (
@@ -225,6 +263,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 = '[]')
+
+
+
+
+
+
@@ -413,16 +473,7 @@
AND crfc.case_id in (select case_id from case_review_functional_case_user crfcu where crfcu.review_id = #{request.reviewId} and crfcu.user_id = #{userId})
-
-
- AND
-
-
- and (
-
- )
-
-
+
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 7dcceffb35..cd4fb24c8a 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
@@ -462,17 +462,6 @@
-
-
-
- 1 = 1
-
-
- 1 = 2
-
-
-
-