This commit is contained in:
UlricQin 2021-11-29 20:06:45 +08:00
parent c17ade64e1
commit d43067bad4
2 changed files with 4 additions and 4 deletions

View File

@ -162,7 +162,7 @@ func AlertCurEventTotal(bgid, stime, etime int64, severity int, clusters []strin
arr := strings.Fields(query)
for i := 0; i < len(arr); i++ {
qarg := "%" + arr[i] + "%"
session = session.Where("rule_name like ? or tags like ?", qarg)
session = session.Where("rule_name like ? or tags like ?", qarg, qarg)
}
}
@ -184,7 +184,7 @@ func AlertCurEventGets(bgid, stime, etime int64, severity int, clusters []string
arr := strings.Fields(query)
for i := 0; i < len(arr); i++ {
qarg := "%" + arr[i] + "%"
session = session.Where("rule_name like ? or tags like ?", qarg)
session = session.Where("rule_name like ? or tags like ?", qarg, qarg)
}
}

View File

@ -103,7 +103,7 @@ func AlertHisEventTotal(bgid, stime, etime int64, severity int, recovered int, c
arr := strings.Fields(query)
for i := 0; i < len(arr); i++ {
qarg := "%" + arr[i] + "%"
session = session.Where("rule_name like ? or tags like ?", qarg)
session = session.Where("rule_name like ? or tags like ?", qarg, qarg)
}
}
@ -129,7 +129,7 @@ func AlertHisEventGets(bgid, stime, etime int64, severity int, recovered int, cl
arr := strings.Fields(query)
for i := 0; i < len(arr); i++ {
qarg := "%" + arr[i] + "%"
session = session.Where("rule_name like ? or tags like ?", qarg)
session = session.Where("rule_name like ? or tags like ?", qarg, qarg)
}
}