From e5944eea95a7ea0e1753b43b4f81642a94b32c26 Mon Sep 17 00:00:00 2001 From: anlicheng Date: Mon, 19 Jun 2023 11:48:52 +0800 Subject: [PATCH] fix --- apps/iot/src/iot_host2.erl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/iot/src/iot_host2.erl b/apps/iot/src/iot_host2.erl index 34b5b90..c33d814 100644 --- a/apps/iot/src/iot_host2.erl +++ b/apps/iot/src/iot_host2.erl @@ -302,7 +302,10 @@ handle_event(cast, {handle_message, #{<<"method">> := <<"inform">>, <<"params">> #{<<"at">> := At, <<"services">> := ServiceInforms} -> lists:foreach(fun(#{<<"props">> := Props, <<"name">> := Name, <<"version">> := Version, <<"version_copy">> := VersionCopy, <<"status">> := Status}) -> %% props 主机id:场景id:微服务id - [_, SceneId, MicroId] = binary:split(Props, <<":">>, [global]), + [_, SceneId0, MicroId0] = binary:split(Props, <<":">>, [global]), + SceneId = binary_to_integer(SceneId0), + MicroId = binary_to_integer(MicroId0), + micro_inform_log:insert(#{ <<"host_id">> => HostId, <<"scene_id">> => SceneId,