feat: 添加告警类型字段并新增告警相关接口
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
// 查询结果
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
// 查询结果
|
||||
|
||||
Reference in New Issue
Block a user