mirror of
https://gitee.com/XM-GO/PandaX.git
synced 2026-04-23 02:48:34 +08:00
组织数据读取权限完成
This commit is contained in:
@@ -61,6 +61,7 @@ func (n *createAlarmNode) Handle(msg *message.Message) error {
|
||||
alarm.Type = n.AlarmType
|
||||
alarm.Time = time.Now()
|
||||
alarm.OrgId = msg.Metadata.GetValue("orgId").(int64)
|
||||
alarm.Owner = msg.Metadata.GetValue("owner").(string)
|
||||
marshal, _ := json.Marshal(msg.Msg)
|
||||
alarm.Details = string(marshal)
|
||||
err := services.DeviceAlarmModelDao.Insert(*alarm)
|
||||
|
||||
@@ -41,6 +41,7 @@ func (n *logNode) Handle(msg *message.Message) error {
|
||||
MsgType: msg.MsgType,
|
||||
DeviceId: msg.Metadata["deviceId"].(string),
|
||||
OrgId: msg.Metadata["orgId"].(int64),
|
||||
Owner: msg.Metadata["owner"].(string),
|
||||
DeviceName: msg.Metadata["deviceName"].(string),
|
||||
Ts: msg.Ts,
|
||||
Content: logMessage,
|
||||
|
||||
Reference in New Issue
Block a user