From 5aa588f990bedf32588b4e5db9ba4b6947f59cdd Mon Sep 17 00:00:00 2001 From: anlicheng <244108715@qq.com> Date: Tue, 26 Dec 2023 17:10:38 +0800 Subject: [PATCH] fix mock --- apps/iot/src/consumer/iot_zd_consumer.erl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/iot/src/consumer/iot_zd_consumer.erl b/apps/iot/src/consumer/iot_zd_consumer.erl index d4d99e1..581c9a7 100644 --- a/apps/iot/src/consumer/iot_zd_consumer.erl +++ b/apps/iot/src/consumer/iot_zd_consumer.erl @@ -15,7 +15,7 @@ %% API -export([start_link/0]). --export([mock/4]). +-export([mock/5]). %% gen_server callbacks -export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]). @@ -43,12 +43,13 @@ %%% API %%%=================================================================== -mock(LocationCode, SType, CType, Value) when is_binary(LocationCode), is_integer(SType), is_integer(CType) -> +mock(LocationCode, Para, SType, CType, Value) when is_binary(LocationCode), is_integer(SType), is_integer(CType), is_integer(Para) -> Req = #{ <<"version">> => <<"1.0">>, <<"ts">> => iot_util:current_time(), <<"properties">> => #{ <<"type">> => <<"ctrl">>, + <<"para">> => Para, <<"stype">> => SType, <<"ctype">> => CType, <<"value">> => Value,