增加两个批量查询接口
This commit is contained in:
@@ -69,7 +69,7 @@ type HistoricalAlarmDTO struct {
|
||||
AlarmCode models.AlarmCode `json:"alarm_code"`
|
||||
AlarmSummary string `json:"alarm_summary"`
|
||||
Level models.SeverityLevel `json:"level"`
|
||||
AlarmDetails string `json:"alarm_details"`
|
||||
AlarmDetails string `json:"json_details"`
|
||||
TriggerTime time.Time `json:"trigger_time"`
|
||||
ResolveTime time.Time `json:"resolve_time"`
|
||||
ResolveMethod string `json:"resolve_method"`
|
||||
@@ -138,3 +138,35 @@ type DeviceThresholdAlarmDTO struct {
|
||||
Operator models.Operator `json:"operator"`
|
||||
Level models.SeverityLevel `json:"level"`
|
||||
}
|
||||
|
||||
// ListDeviceThresholdAlarmRequest 定义了获取设备阈值告警列表的请求参数
|
||||
type ListDeviceThresholdAlarmRequest struct {
|
||||
Page int `json:"page" query:"page"`
|
||||
PageSize int `json:"page_size" query:"page_size"`
|
||||
DeviceID *uint32 `json:"device_id" query:"device_id"` // 按设备ID过滤
|
||||
SensorType *models.SensorType `json:"sensor_type" query:"sensor_type"` // 按传感器类型过滤
|
||||
Level *models.SeverityLevel `json:"level" query:"level"` // 按告警等级过滤
|
||||
OrderBy string `json:"order_by" query:"order_by"` // 排序字段,例如 "id DESC"
|
||||
}
|
||||
|
||||
// ListDeviceThresholdAlarmResponse 是获取设备阈值告警列表的响应结构
|
||||
type ListDeviceThresholdAlarmResponse struct {
|
||||
List []DeviceThresholdAlarmDTO `json:"list"`
|
||||
Pagination PaginationDTO `json:"pagination"`
|
||||
}
|
||||
|
||||
// ListAreaThresholdAlarmRequest 定义了获取区域阈值告警列表的请求参数
|
||||
type ListAreaThresholdAlarmRequest struct {
|
||||
Page int `json:"page" query:"page"`
|
||||
PageSize int `json:"page_size" query:"page_size"`
|
||||
AreaControllerID *uint32 `json:"area_controller_id" query:"area_controller_id"` // 按区域主控ID过滤
|
||||
SensorType *models.SensorType `json:"sensor_type" query:"sensor_type"` // 按传感器类型过滤
|
||||
Level *models.SeverityLevel `json:"level" query:"level"` // 按告警等级过滤
|
||||
OrderBy string `json:"order_by" query:"order_by"` // 排序字段,例如 "id DESC"
|
||||
}
|
||||
|
||||
// ListAreaThresholdAlarmResponse 是获取区域阈值告警列表的响应结构
|
||||
type ListAreaThresholdAlarmResponse struct {
|
||||
List []AreaThresholdAlarmDTO `json:"list"`
|
||||
Pagination PaginationDTO `json:"pagination"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user