liuxiulin 2 days ago
parent
commit
38bec47575
1 changed files with 6 additions and 1 deletions
  1. 6 1
      pkg/ruleEngine/nodes/temp_alarm_node.go

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

@@ -2,6 +2,7 @@ package nodes
 
 import (
 	"encoding/json"
+	"errors"
 	"fmt"
 	"github.com/gogf/gf/encoding/gjson"
 	"github.com/gogf/gf/os/grpool"
@@ -105,7 +106,11 @@ func (t *TempAlarmNode) newAlarmMessage(message *protocol.Message) error {
 		if result == nil {
 			return nil
 		}
-		j := gjson.New(result.Body)
+		req, err := t.client.Do(result)
+		if req == nil {
+			return errors.New("请求出错")
+		}
+		j := gjson.New(req.Response().Body)
 		fmt.Printf("查询用户信息------------------:%s\r\n", j.MustToJsonString())
 		dataMap = j.GetMap("data")
 		fmt.Printf("dataMap------------------:%v\r\n", dataMap)