summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortanghao <[email protected]>2023-11-07 17:55:09 +0800
committertanghao <[email protected]>2023-11-07 17:55:09 +0800
commitfec31e7e9ae283247f7d9fd3a3960b15732bfe1c (patch)
treed9e8e5c3431d45a13447e17061fc558363e1a818
parent45a3d2c2056e8cb28f5b7c1569352c9f5f24a9a2 (diff)
fix: CN-1414 Detections-Policies模块中,搜索框只能通过Name进行搜索
-rw-r--r--cn-admin/src/main/resources/mapper/rule/DetectionRuleDao.xml5
1 files changed, 3 insertions, 2 deletions
diff --git a/cn-admin/src/main/resources/mapper/rule/DetectionRuleDao.xml b/cn-admin/src/main/resources/mapper/rule/DetectionRuleDao.xml
index ce04ae4..31e9fa1 100644
--- a/cn-admin/src/main/resources/mapper/rule/DetectionRuleDao.xml
+++ b/cn-admin/src/main/resources/mapper/rule/DetectionRuleDao.xml
@@ -24,8 +24,9 @@
detection_rule
<where>
1 = 1 and is_valid = 1 and is_built_in !=1
- <if test=" params.name !=null and params.name !='' ">
- and name like concat ( '%', #{params.name}, '%')
+ <if test=" params.q !=null and params.q !='' ">
+ and ((name like concat ( '%', #{params.q}, '%')) or (rule_id = #{params.q})
+ or (description like concat ( '%', #{params.q}, '%')))
</if>
<if test=" params.status !=null ">
and status = #{params.status}