消息处理模块重构

Signed-off-by: lixxxww <941403820@qq.com>
This commit is contained in:
lixxxww
2024-01-22 07:26:49 +00:00
committed by Gitee
parent 6a9e1b5587
commit 4502bf3ff4
5 changed files with 51 additions and 57 deletions

View File

@@ -32,8 +32,8 @@ func BuildRunDeviceRpc(deviceId, mode string, msgData map[string]interface{}) er
code, _ := json.Marshal(dataCode)
//新建规则链实体
instance, errs := rule_engine.NewRuleChainInstance(findOne.Id, code)
if len(errs) > 0 {
return errs[0]
if err != nil {
return errs
}
metadataVals := map[string]interface{}{
"deviceId": device.Id,