From b97e4971ba7ea9b5f29e4dfbbf5b8be7c187aa50 Mon Sep 17 00:00:00 2001 From: AgAngle <1323481023@qq.com> Date: Tue, 22 Oct 2024 16:44:36 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E9=AB=98=E7=BA=A7=E6=90=9C=E7=B4=A2=EF=BC=8C=E7=AD=89=E4=BA=8E?= =?UTF-8?q?=E6=9D=A1=E4=BB=B6=E6=9F=A5=E8=AF=A2=E7=89=B9=E6=AE=8A=E5=AD=97?= =?UTF-8?q?=E7=AC=A6=EF=BC=8C=E7=BB=93=E6=9E=9C=E6=9C=89=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1047797 --user=陈建星 【高级搜索】-筛选条件为名称等于关键字,如果关键字中包含特殊字符,搜索结果错误 https://www.tapd.cn/55049933/s/1595744 --- .../system/interceptor/BaseConditionFilterAspect.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/interceptor/BaseConditionFilterAspect.java b/backend/services/system-setting/src/main/java/io/metersphere/system/interceptor/BaseConditionFilterAspect.java index f1d3d5ccb0..26521c2e31 100644 --- a/backend/services/system-setting/src/main/java/io/metersphere/system/interceptor/BaseConditionFilterAspect.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/interceptor/BaseConditionFilterAspect.java @@ -66,7 +66,8 @@ public class BaseConditionFilterAspect { } List validConditions = getValidConditions(combineSearch.getConditions()); validConditions.forEach(item -> { - if (item.getValue() != null && item.getValue() instanceof String strValue) { + if (item.getValue() != null && item.getValue() instanceof String strValue + && !StringUtils.equals(item.getOperator(), CombineCondition.CombineConditionOperator.EQUALS.name())) { // 转义 mysql 的特殊字符 item.setValue(BaseCondition.transferKeyword(strValue)); }