mirror of
https://gitee.com/XM-GO/PandaX.git
synced 2026-04-30 03:41:25 +08:00
规则链审计日志
This commit is contained in:
@@ -124,10 +124,8 @@ func (p *DeviceApi) InsertDevice(rc *restfulx.ReqCtx) {
|
||||
data.LinkStatus = global.INACTIVE
|
||||
data.LastAt = time.Now()
|
||||
p.DeviceApp.Insert(data)
|
||||
// 视频设备不创建超级表
|
||||
if data.DeviceType != global.MONITOR {
|
||||
createDeviceTable(data.Pid, data.Name)
|
||||
}
|
||||
// 创建超级表
|
||||
createDeviceTable(data.Pid, data.Name)
|
||||
}
|
||||
|
||||
// UpdateDevice 修改Device
|
||||
@@ -145,9 +143,7 @@ func (p *DeviceApi) DeleteDevice(rc *restfulx.ReqCtx) {
|
||||
for _, id := range ids {
|
||||
list := p.DeviceApp.FindOne(id)
|
||||
// 删除表
|
||||
if list.DeviceType != global.MONITOR {
|
||||
deleteDeviceTable(list.Name)
|
||||
}
|
||||
deleteDeviceTable(list.Name)
|
||||
}
|
||||
p.DeviceApp.Delete(ids)
|
||||
}
|
||||
|
||||
@@ -16,13 +16,15 @@ type DeviceAlarmApi struct {
|
||||
|
||||
// GetDeviceAlarmList 告警列表数据
|
||||
func (p *DeviceAlarmApi) GetDeviceAlarmList(rc *restfulx.ReqCtx) {
|
||||
data := entity.DeviceAlarm{}
|
||||
data := entity.DeviceAlarmForm{}
|
||||
pageNum := restfulx.QueryInt(rc, "pageNum", 1)
|
||||
pageSize := restfulx.QueryInt(rc, "pageSize", 10)
|
||||
data.DeviceId = restfulx.QueryParam(rc, "deviceId")
|
||||
data.Type = restfulx.QueryParam(rc, "type")
|
||||
data.Level = restfulx.QueryParam(rc, "level")
|
||||
data.State = restfulx.QueryParam(rc, "state")
|
||||
data.StartTime = restfulx.QueryParam(rc, "startTime")
|
||||
data.EndTime = restfulx.QueryParam(rc, "endTime")
|
||||
|
||||
list, total := p.DeviceAlarmApp.FindListPage(pageNum, pageSize, data)
|
||||
|
||||
|
||||
@@ -70,10 +70,8 @@ func (p *ProductApi) InsertProduct(rc *restfulx.ReqCtx) {
|
||||
data.Id = kgo.KStr.Uniqid("p_")
|
||||
data.Owner = rc.LoginAccount.UserName
|
||||
p.ProductApp.Insert(data)
|
||||
// 创建taos数据库超级表 摄像头产品不创建
|
||||
if data.DeviceType != global.MONITOR {
|
||||
createDeviceStable(data.Id)
|
||||
}
|
||||
// 创建taos数据库超级表
|
||||
createDeviceStable(data.Id)
|
||||
}
|
||||
|
||||
// UpdateProduct 修改Product
|
||||
|
||||
Reference in New Issue
Block a user