fix(接口测试): 高级搜索,等于条件查询特殊字符,结果有误

--bug=1047797 --user=陈建星 【高级搜索】-筛选条件为名称等于关键字,如果关键字中包含特殊字符,搜索结果错误 https://www.tapd.cn/55049933/s/1595744
This commit is contained in:
AgAngle 2024-10-22 16:44:36 +08:00 committed by Craftsman
parent 8678aa8b93
commit b97e4971ba
1 changed files with 2 additions and 1 deletions

View File

@ -66,7 +66,8 @@ public class BaseConditionFilterAspect {
}
List<CombineCondition> 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));
}