From 8333f7b404e713f66b7a3b48f2b6ef7e889a887e Mon Sep 17 00:00:00 2001 From: song-cc-rock Date: Fri, 31 Mar 2023 18:29:57 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA):=20?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E7=94=A8=E4=BE=8B=E5=88=97=E8=A1=A8=E4=B8=8D?= =?UTF-8?q?=E5=B1=9E=E4=BA=8E=E4=B8=8D=E5=8C=85=E5=90=AB=E7=AD=89=E6=9D=A1?= =?UTF-8?q?=E4=BB=B6=E6=9F=A5=E8=AF=A2SQL=E6=9C=89=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1025019 --user=宋昌昌 【测试跟踪】github#23303,筛选自定义字段不属于条件不生效 https://www.tapd.cn/55049933/s/1358326 --- .../base/mapper/ext/ExtBaseMapper.xml | 35 +++++++++++++++++++ .../base/mapper/ext/ExtTestCaseMapper.xml | 13 ++++--- 2 files changed, 44 insertions(+), 4 deletions(-) diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/base/mapper/ext/ExtBaseMapper.xml b/framework/sdk-parent/sdk/src/main/java/io/metersphere/base/mapper/ext/ExtBaseMapper.xml index 4476e65484..ba4b7da806 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/base/mapper/ext/ExtBaseMapper.xml +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/base/mapper/ext/ExtBaseMapper.xml @@ -22,6 +22,41 @@ + + + + like CONCAT('%', #{${object}.value},'%') + + + in + + #{v} + + + + between #{${object}.value[0]} and #{${object}.value[1]} + + + > #{${object}.value} + + + < #{${object}.value} + + + >= #{${object}.value} + + + <= #{${object}.value} + + + = '${@io.metersphere.commons.utils.SessionUtils@getUserId()}' + + + = #{${object}.value} + + + + diff --git a/test-track/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestCaseMapper.xml b/test-track/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestCaseMapper.xml index 007c129b2f..e6cfb062a9 100644 --- a/test-track/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestCaseMapper.xml +++ b/test-track/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestCaseMapper.xml @@ -133,7 +133,12 @@ - and test_case.id in ( + + and test_case.id not in ( + + + and test_case.id in ( + select resource_id from custom_field_test_case where field_id = #{custom.id} @@ -141,19 +146,19 @@ and left(replace(unix_timestamp(trim(both '"' from `value`)), '.', ''), 13) - + and text_value - + and trim(both '"' from value) - +