[优化]优化目录

This commit is contained in:
PandaX
2023-11-07 16:45:23 +08:00
parent 3a4cea5b26
commit 6bdc4b1dd6
37 changed files with 97 additions and 98 deletions

View File

@@ -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)

View File

@@ -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"),
}

View File

@@ -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"),
}