|
@@ -112,12 +112,13 @@ func (t *TempAlarmNode) newAlarmMessage(message *protocol.Message) error {
|
|
|
}
|
|
|
reqStr, err := req.String()
|
|
|
if err != nil {
|
|
|
- fmt.Printf("str转换错误----------%s\n", err.Error())
|
|
|
+ return err
|
|
|
}
|
|
|
- fmt.Printf("查询用户信息------------------:%s\r\n", reqStr)
|
|
|
j := gjson.New(reqStr)
|
|
|
+ if j.GetInt("code") == -1 {
|
|
|
+ return nil
|
|
|
+ }
|
|
|
dataMap = j.GetMap("data")
|
|
|
- fmt.Printf("dataMap------------------:%v\r\n", dataMap)
|
|
|
} else {
|
|
|
j := gjson.New(message.Data)
|
|
|
dataMap = j.GetMap("status")
|
|
@@ -127,6 +128,7 @@ func (t *TempAlarmNode) newAlarmMessage(message *protocol.Message) error {
|
|
|
if err != nil {
|
|
|
return err
|
|
|
}
|
|
|
+ fmt.Printf("message:-----------%s\n", message.AlarmMessage)
|
|
|
return nil
|
|
|
}
|
|
|
|