38 Star 442 Fork 135

联犀/物联网iot模块

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
assemble.go 666 Bytes
一键复制 编辑 原始数据 按行查看 历史
杨磊 提交于 5个月前 . feat: 更新mod
package hubLogRepo
import (
"gitee.com/unitedrhino/things/service/dmsvr/internal/domain/deviceLog"
"github.com/spf13/cast"
)
func ToDeviceLog(productID string, db map[string]any) *deviceLog.Hub {
return &deviceLog.Hub{
ProductID: productID,
DeviceName: cast.ToString(db["device_name"]),
Content: cast.ToString(db["content"]),
Topic: cast.ToString(db["topic"]),
Action: cast.ToString(db["action"]),
Timestamp: cast.ToTime(db["ts"]),
RequestID: cast.ToString(db["request_id"]),
TraceID: cast.ToString(db["trace_id"]),
ResultCode: cast.ToInt64(db["result_type"]),
RespPayload: cast.ToString(db["resp_payload"]),
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/unitedrhino/things.git
git@gitee.com:unitedrhino/things.git
unitedrhino
things
物联网iot模块
v1.0.2

搜索帮助