From c3a605e99f28728c65a13d0be6fb59c3c8ee84ac Mon Sep 17 00:00:00 2001 From: WangXu10 Date: Sun, 4 Feb 2024 13:59:37 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E7=94=A8=E4=BE=8B=E7=AE=A1=E7=90=86):?= =?UTF-8?q?=20=E7=94=A8=E4=BE=8B=E8=AF=84=E5=AE=A1=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ExtCaseReviewFunctionalCaseMapper.xml | 50 +++++++------- .../mapper/ExtFunctionalCaseMapper.xml | 66 ++++++------------- .../request/BaseReviewCaseBatchRequest.java | 4 ++ .../service/FunctionalCaseModuleService.java | 4 ++ .../service/FunctionalCaseService.java | 4 ++ 5 files changed, 57 insertions(+), 71 deletions(-) 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 860e8b7931..a16ce0b74f 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 @@ -71,7 +71,7 @@ #{moduleId} - + and ( functional_case.name like concat('%', #{request.keyword},'%') or functional_case.num like concat('%', #{request.keyword},'%') @@ -306,16 +306,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 ( - - ) - - + SELECT pos 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 cd4fb24c8a..a08fb77935 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 @@ -356,28 +356,6 @@ - - - ${versionTable}.version_id = #{request.versionId} - - - - - - ${versionTable}.ref_id = #{request.refId} - - - - - - ${versionTable}.latest = 1 - - - - - 1 = 1 - - and ${versionTable}.version_id = #{request.versionId} @@ -513,51 +491,49 @@ WHERE functional_case.project_id = #{projectId} and functional_case.deleted = #{deleted} - - - AND - - - and ( - - ) - - + - 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 ( + + ) + + + + + + + + - - - + 1=1