Kaynağa Gözat

状态上报消息头添加时间戳

liuxiulin 2 yıl önce
ebeveyn
işleme
ec4b99b6ae
1 değiştirilmiş dosya ile 2 ekleme ve 1 silme
  1. 2 1
      services/controller/controller.go

+ 2 - 1
services/controller/controller.go

@@ -15,6 +15,7 @@ import (
 	"sparrow/pkg/rule"
 	"sparrow/pkg/ruleEngine"
 	"sparrow/pkg/server"
+	"strconv"
 	"time"
 )
 
@@ -166,7 +167,7 @@ func (c *Controller) OnStatus(args rpcs.ArgsOnStatus, reply *rpcs.ReplyOnStatus)
 			"vendor_id":     args.VendorId,
 			"device_id":     args.DeviceId,
 			"sub_device_id": args.SubDeviceId,
-			"timestamp":     args.Timestamp,
+			"timestamp":     strconv.Itoa(int(args.Timestamp)),
 		},
 		Originator: "device",
 	}