fix: location

This commit is contained in:
dawnwinterLiu 2022-07-11 20:44:20 +08:00
parent b4d3faa787
commit 7fb8ba7973
3 changed files with 4 additions and 2 deletions

View File

@ -115,7 +115,7 @@ get_newdata(Device, ProductId) ->
#{
<<"profile">> => maps:get(<<"profile">>, Device, Profile),
<<"content">> => maps:get(<<"content">>, Device, Content),
<<"location">> => maps:get(<<"location">>, Device, Location),
<<"location">> => maps:get(<<"location">>, Device, Location#{<<"__type">> => <<"GeoPoint">>}),
<<"address">> => maps:get(<<"address">>, Device, Address)
}.

View File

@ -265,6 +265,8 @@ get_attrs(Type, ProductId, ClassName, Attrs, DeviceId, KonvatId, Shapeid, Identi
dgiot_data:insert({toponotext, ProductId}, New_Topo)
end,
Text2;
{ok, null} ->
<<"--">>;
{ok, Text1} ->
get_konva_value(ProductId, Identifier1, Text1)
end,

View File

@ -98,7 +98,7 @@ login(Name, UserName, Password) ->
dgiot_parse:request_rest(Name, 'GET', [], Path, Args, [{from, rest}]).
load_roleuser() ->
dgiot_data:delete_all_objects(?PARENT_ROLE_ETS),
%% dgiot_data:delete_all_objects(?PARENT_ROLE_ETS),
Success = fun(Page) ->
lists:map(fun
(#{<<"objectId">> := RoleId}) ->