Browse Source

[REV] 引入短信告警,调整alertstatus判断条件

pujielan 1 month ago
parent
commit
15bdb01528
1 changed files with 3 additions and 1 deletions
  1. 3 1
      app/observe/service/event.go

+ 3 - 1
app/observe/service/event.go

@@ -22,8 +22,10 @@ func (e *Event) GetPage(c *dto.EventListReq, result *[]dto.EventListResp, count
 	if c.AppId > 0 {
 		db.Where("AppId", c.AppId)
 	}
-	if c.AlertStatus == 2 || c.AlertStatus == 4 {
+	if c.AlertStatus == 2 {
 		db.Where("AlertStatus", c.AlertStatus)
+	} else if c.AlertStatus == 4 {
+		db.Where("AlertStatus >=?", c.AlertStatus)
 	}
 	// db.Scopes(cDto.MakeCondition(*c))
 	if c.StartTime > 0 {