feat: 添加告警类型字段并新增告警相关接口

This commit is contained in:
TsMask
2025-02-28 15:58:43 +08:00
parent 53a3e73946
commit f92e9a1704
14 changed files with 157 additions and 166 deletions

View File

@@ -11,7 +11,7 @@ import (
// 实例化数据层 AlarmForwardLog 结构体
var NewAlarmForwardLog = &AlarmForwardLog{}
// AlarmForwardLog 基站状态记录表 数据层处理
// AlarmForwardLog 告警转发记录表 数据层处理
type AlarmForwardLog struct{}
// SelectByPage 分页查询集合
@@ -25,10 +25,10 @@ func (r AlarmForwardLog) SelectByPage(query model.AlarmForwardLogQuery) ([]model
tx = tx.Where("ne_id = ?", query.NeID)
}
if query.BeginTime != 0 {
tx = tx.Where("create_time >= ?", query.BeginTime)
tx = tx.Where("created_at >= ?", query.BeginTime)
}
if query.EndTime != 0 {
tx = tx.Where("create_time <= ?", query.EndTime)
tx = tx.Where("created_at <= ?", query.EndTime)
}
// 查询结果

View File

@@ -25,10 +25,10 @@ func (r AlarmLog) SelectByPage(query model.AlarmLogQuery) ([]model.AlarmLog, int
tx = tx.Where("ne_id = ?", query.NeID)
}
if query.BeginTime != 0 {
tx = tx.Where("create_time >= ?", query.BeginTime)
tx = tx.Where("created_at >= ?", query.BeginTime)
}
if query.EndTime != 0 {
tx = tx.Where("create_time <= ?", query.EndTime)
tx = tx.Where("created_at <= ?", query.EndTime)
}
// 查询结果