This commit is contained in:
anlicheng 2025-03-27 15:33:54 +08:00
parent 7939f25e57
commit ecc5f19760

View File

@ -18,12 +18,13 @@ route_uuid(RouterUUID, EventType, Params) when is_binary(RouterUUID), is_integer
%% %%
case redis_client:hgetall(RouterUUID) of case redis_client:hgetall(RouterUUID) of
{ok, #{<<"location_code">> := LocationCode, <<"dynamic_location_code">> := DynamicLocationCode}} when is_binary(LocationCode), is_binary(DynamicLocationCode) -> {ok, #{<<"location_code">> := LocationCode, <<"dynamic_location_code">> := DynamicLocationCode}} when is_binary(LocationCode), is_binary(DynamicLocationCode) ->
lager:debug("[iot_ai_router] hget uuid: ~p, location_code: ~p", [RouterUUID, LocationCode]),
%% 2024-12-02, 2 %% 2024-12-02, 2
lists:member(EventType, [15]) andalso iot_donghuoliren_endpoint:forward(LocationCode, DynamicLocationCode, EventType, Params), lists:member(EventType, [15]) andalso iot_donghuoliren_endpoint:forward(LocationCode, DynamicLocationCode, EventType, Params),
%% 2024-03-21 %% 2024-03-21
iot_jinzhi_endpoint:forward(LocationCode, DynamicLocationCode, EventType, Params); iot_jinzhi_endpoint:forward(LocationCode, DynamicLocationCode, EventType, Params);
{ok, _} -> {ok, _} ->
lager:debug("[iot_ai_router] the event_data hget location_code, uuid: ~p, not found", [RouterUUID]); lager:debug("[iot_ai_router] hget location_code, uuid: ~p, not found", [RouterUUID]);
{error, Reason} -> {error, Reason} ->
lager:debug("[iot_ai_router] the event_data hget location_code uuid: ~p, get error: ~p", [RouterUUID, Reason]) lager:debug("[iot_ai_router] hget location_code uuid: ~p, get error: ~p", [RouterUUID, Reason])
end. end.