增加两个批量查询接口

This commit is contained in:
2025-11-16 16:30:26 +08:00
parent bf747e22ce
commit bf1600b385
10 changed files with 1041 additions and 11 deletions

View File

@@ -199,12 +199,14 @@ func (a *API) setupRoutes() {
thresholdGroup.GET("/historical-alarms", a.alarmController.ListHistoricalAlarms) // 获取历史告警
// 设备阈值告警配置
thresholdGroup.GET("/device", a.alarmController.ListDeviceThresholdAlarms)
thresholdGroup.POST("/device", a.alarmController.CreateDeviceThresholdAlarm)
thresholdGroup.GET("/device/:task_id", a.alarmController.GetDeviceThresholdAlarm)
thresholdGroup.PUT("/device/:task_id", a.alarmController.UpdateDeviceThresholdAlarm)
thresholdGroup.DELETE("/device/:task_id", a.alarmController.DeleteDeviceThresholdAlarm)
// 区域阈值告警配置
thresholdGroup.GET("/area", a.alarmController.ListAreaThresholdAlarms)
thresholdGroup.POST("/area", a.alarmController.CreateAreaThresholdAlarm)
thresholdGroup.GET("/area/:task_id", a.alarmController.GetAreaThresholdAlarm)
thresholdGroup.PUT("/area/:task_id", a.alarmController.UpdateAreaThresholdAlarm)