|
@@ -67,7 +67,7 @@ func (a *Alert) GetRules(vendorid uint, pi, ps, proid, protocalid int, name stri
|
|
tx = tx.Where("protocal_id = ?", protocalid)
|
|
tx = tx.Where("protocal_id = ?", protocalid)
|
|
}
|
|
}
|
|
if name != "" {
|
|
if name != "" {
|
|
- tx = tx.Where("alert_name = ?", "%"+name+"%")
|
|
|
|
|
|
+ tx = tx.Where("alert_name like ?", "%"+name+"%")
|
|
}
|
|
}
|
|
err = tx.Limit(ps).Offset((pi - 1) * ps).Find(&datas).Error
|
|
err = tx.Limit(ps).Offset((pi - 1) * ps).Find(&datas).Error
|
|
err = tx.Model(&models.AlarmRule{}).Count(&total).Error
|
|
err = tx.Model(&models.AlarmRule{}).Count(&total).Error
|