mirror of
https://gitee.com/XM-GO/PandaX.git
synced 2026-04-23 02:48:34 +08:00
[优化]优化目录
This commit is contained in:
@@ -5,7 +5,7 @@ import (
|
||||
"pandax/apps/device/entity"
|
||||
"pandax/apps/device/services"
|
||||
"pandax/pkg/global"
|
||||
"pandax/pkg/global_model"
|
||||
"pandax/pkg/global/model"
|
||||
"pandax/pkg/rule_engine/message"
|
||||
"time"
|
||||
)
|
||||
@@ -48,7 +48,7 @@ func (n *createAlarmNode) Handle(msg *message.Message) error {
|
||||
}
|
||||
} else {
|
||||
alarm = &entity.DeviceAlarm{}
|
||||
alarm.Id = global_model.GenerateID()
|
||||
alarm.Id = model.GenerateID()
|
||||
alarm.DeviceId = msg.Metadata.GetValue("deviceId").(string)
|
||||
alarm.ProductId = msg.Metadata.GetValue("productId").(string)
|
||||
alarm.Name = msg.Metadata.GetValue("deviceName").(string)
|
||||
|
||||
@@ -5,7 +5,7 @@ import (
|
||||
"pandax/iothub/client/mqttclient"
|
||||
"pandax/iothub/client/tcpclient"
|
||||
"pandax/pkg/global"
|
||||
"pandax/pkg/global_model"
|
||||
"pandax/pkg/global/model"
|
||||
"pandax/pkg/rule_engine/message"
|
||||
)
|
||||
|
||||
@@ -34,7 +34,7 @@ func (n *rpcRequestFromDeviceNode) Handle(msg *message.Message) error {
|
||||
if msg.Msg.GetValue("method") == nil || msg.Msg.GetValue("params") == nil {
|
||||
return errors.New("指令请求格式错误")
|
||||
}
|
||||
var rpcp = global_model.RpcPayload{
|
||||
var rpcp = model.RpcPayload{
|
||||
Method: msg.Msg.GetValue("method").(string),
|
||||
Params: msg.Msg.GetValue("params"),
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ import (
|
||||
"pandax/iothub/client/mqttclient"
|
||||
"pandax/iothub/client/tcpclient"
|
||||
"pandax/pkg/global"
|
||||
"pandax/pkg/global_model"
|
||||
"pandax/pkg/global/model"
|
||||
"pandax/pkg/rule_engine/message"
|
||||
)
|
||||
|
||||
@@ -34,7 +34,7 @@ func (n *rpcRequestToDeviceNode) Handle(msg *message.Message) error {
|
||||
if msg.Msg.GetValue("method") == nil || msg.Msg.GetValue("params") == nil {
|
||||
return errors.New("指令下发格式错误")
|
||||
}
|
||||
var datas = global_model.RpcPayload{
|
||||
var datas = model.RpcPayload{
|
||||
Method: msg.Msg.GetValue("method").(string),
|
||||
Params: msg.Msg.GetValue("params"),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user