liuxiulin 1 天之前
父節點
當前提交
f0344908c5
共有 1 個文件被更改,包括 1 次插入7 次删除
  1. 1 7
      pkg/ruleEngine/nodes/temp_alarm_node.go

+ 1 - 7
pkg/ruleEngine/nodes/temp_alarm_node.go

@@ -135,13 +135,8 @@ func (t *TempAlarmNode) newAlarmMessage(message *protocol.Message) error {
 
 func (t *TempAlarmNode) evaluateConditions(message *protocol.Message) bool {
 	deviceId := message.MetaData["device_id"].(string)
-	fmt.Printf("message------------------:%s\r\n", gjson.New(message.MetaData).MustToJsonString())
-
-	fmt.Printf("productKey------------------:%s\r\n", message.MetaData["product_key"])
-	fmt.Printf("config:--------------------%s\r\n", gjson.New(t.config).MustToJsonString())
 	// 判断设备类型
 	if message.MetaData["product_key"].(string) != t.config.ProductKey {
-
 		return false
 	}
 
@@ -208,7 +203,7 @@ func (t *TempAlarmNode) evaluateConditions(message *protocol.Message) bool {
 	if err != nil {
 		server.Log.Errorf("device offline error. deviceid: %v, error: %v", reply.AlarmParams.DeviceCode, err)
 	}
-
+	fmt.Printf("reply------------------:%s\r\n", gjson.New(reply).MustToJsonString())
 	if reply.AlarmParams.FirstReportTime == 0 {
 		setArgs := rpcs.ArgsAlarmInfo{
 			DeviceCode:      deviceId,
@@ -234,7 +229,6 @@ func (t *TempAlarmNode) evaluateConditions(message *protocol.Message) bool {
 			if err != nil {
 				return false
 			}
-
 			return true
 		}
 	}