From e5ea7a485a807ca7ce826c5de0ace1cf81a09b03 Mon Sep 17 00:00:00 2001 From: lucas <249324454@qq.com> Date: Mon, 18 Nov 2024 20:51:34 +0800 Subject: [PATCH 1/3] =?UTF-8?q?fix=20=E6=97=A5=E5=BF=97=E4=B8=AD=E7=9A=84?= =?UTF-8?q?=E8=BF=94=E5=9B=9E=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dbHelper/elasticsearchHelper.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbHelper/elasticsearchHelper.go b/dbHelper/elasticsearchHelper.go index 1042bf8..1a64afc 100644 --- a/dbHelper/elasticsearchHelper.go +++ b/dbHelper/elasticsearchHelper.go @@ -191,7 +191,7 @@ func (the *ESHelper) BulkWrite(index, reqBody string) { if res.StatusCode != 200 && res.StatusCode != 201 { log.Panicf("es 写入失败,err=%s \n body=%s", string(respBody), reqBody) } - log.Printf("es 写入[%s],完成,res=%s ", index, reqBody) + log.Printf("es 写入[%s],完成,res=%s ", index, respBody) } From 995aa2e41569c37c17906973e3c5b693242ca79a Mon Sep 17 00:00:00 2001 From: lucas <249324454@qq.com> Date: Mon, 18 Nov 2024 21:21:43 +0800 Subject: [PATCH 2/3] =?UTF-8?q?update=20=E4=BF=AE=E6=94=B9CollectTime?= =?UTF-8?q?=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adaptors/安心云最新设备数据toES.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adaptors/安心云最新设备数据toES.go b/adaptors/安心云最新设备数据toES.go index 2ae9d3f..f2c9be1 100644 --- a/adaptors/安心云最新设备数据toES.go +++ b/adaptors/安心云最新设备数据toES.go @@ -133,7 +133,7 @@ func toEsRaw(deviceData *models.DeviceData) *models.EsRaw { StructId: deviceData.StructId, IotaDeviceName: deviceData.Name, Data: deviceData.Raw, - CollectTime: deviceData.AcqTime, + CollectTime: deviceData.AcqTime.Format("2006-01-02T15:04:05.000+0800"), Meta: dataOutMeta, IotaDevice: deviceData.DeviceId, CreateTime: time.Now(), From c58ff60910c0b5b777ab652bb511d58520a59684 Mon Sep 17 00:00:00 2001 From: lucas <249324454@qq.com> Date: Mon, 18 Nov 2024 21:29:59 +0800 Subject: [PATCH 3/3] =?UTF-8?q?update=20collectTime=20-=E3=80=8B=20string?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- models/esRaw.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/esRaw.go b/models/esRaw.go index b893c24..a09dc67 100644 --- a/models/esRaw.go +++ b/models/esRaw.go @@ -6,7 +6,7 @@ type EsRaw struct { StructId int `json:"structId"` IotaDeviceName string `json:"iota_device_name"` Data map[string]any `json:"data"` - CollectTime time.Time `json:"collect_time"` + CollectTime string `json:"collect_time"` Meta map[string]string `json:"meta"` IotaDevice string `json:"iota_device"` CreateTime time.Time `json:"create_time"`