liuxiulin 2 days ago
parent
commit
3f26b8e02b
1 changed files with 6 additions and 2 deletions
  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 {