@@ -61,7 +61,7 @@ func (a *Alert) Update(vendorid uint, alert *models.AlarmRule) (data models.Alar
func (a *Alert) GetRules(vendorid uint, pi, ps, proid, protocalid int, name string) (datas []models.AlarmRule, total int, err error) {
tx := a.db.Where("vendor_id = ? and 1=1", vendorid)
if proid != 0 {
- tx = tx.Where("product_id = ?")
+ tx = tx.Where("product_id = ?", proid)
}
if protocalid != 0 {
tx = tx.Where("protocal_id = ?", protocalid)