liuxiulin 2 天之前
父节点
当前提交
3f26b8e02b
共有 1 个文件被更改,包括 6 次插入2 次删除
  1. 6 2
      pkg/ruleEngine/nodes/temp_alarm_node.go

+ 6 - 2
pkg/ruleEngine/nodes/temp_alarm_node.go

@@ -110,8 +110,12 @@ func (t *TempAlarmNode) newAlarmMessage(message *protocol.Message) error {
 		if req == nil {
 			return errors.New("请求出错")
 		}
-		j := gjson.New(req.Response().Body)
-		fmt.Printf("查询用户信息------------------:%s\r\n", j.MustToJsonString())
+		reqStr, err := req.String()
+		if err != nil {
+			fmt.Printf("str转换错误----------%s\n", err.Error())
+		}
+		fmt.Printf("查询用户信息------------------:%s\r\n", reqStr)
+		j := gjson.New(reqStr)
 		dataMap = j.GetMap("data")
 		fmt.Printf("dataMap------------------:%v\r\n", dataMap)
 	} else {