【feat】完成tcp,http的设备上报,及模拟设备测试

This commit is contained in:
XM-GO
2023-09-27 15:15:15 +08:00
parent 950e8d8814
commit 9eff841b81
16 changed files with 778 additions and 168 deletions

View File

@@ -30,7 +30,7 @@ func (s *TdEngine) InsertDevice(deviceKey string, data map[string]any) (err erro
}
sql := "INSERT INTO ? (?) VALUES (?)"
_, err = s.db.Exec(sql, deviceKey, strings.Join(field, ","), strings.Join(value, ","))
_, err = s.db.Exec(sql, strings.ToLower(deviceKey), strings.Join(field, ","), strings.Join(value, ","))
return
}