mirror of
https://gitee.com/dgiiot/dgiot.git
synced 2024-11-30 03:07:40 +08:00
fix: fix sql tpl
This commit is contained in:
parent
8573afc448
commit
d82a80e524
@ -266,9 +266,9 @@ device_sql(Select, From, Where, _Method) ->
|
||||
#{<<"productid">> := ProductId, <<"devaddr">> := Devaddr} ->
|
||||
case Devaddr of
|
||||
<<"#">> ->
|
||||
<<"$dg/user/", ProductId/binary, "/", Devaddr/binary>>;
|
||||
<<"$dg/alarm/", ProductId/binary, "/", Devaddr/binary>>;
|
||||
_ ->
|
||||
<<"$dg/user/", ProductId/binary, "/", Devaddr/binary, "/#">>
|
||||
<<"$dg/alarm/", ProductId/binary, "/", Devaddr/binary, "/#">>
|
||||
end;
|
||||
_ ->
|
||||
<<"thing/", "test/#">>
|
||||
@ -464,7 +464,7 @@ generateFrom(Trigger) ->
|
||||
<<"$dg/alarm/", ProductId/binary, "/", Devaddr/binary, "/#">>
|
||||
end;
|
||||
_ ->
|
||||
<<"$dg/user/", "test/#">>
|
||||
<<"$dg/alarm/", "test/#">>
|
||||
end;
|
||||
<<"trigger/product/event">> ->
|
||||
case Params of
|
||||
@ -478,7 +478,7 @@ generateFrom(Trigger) ->
|
||||
<<"$dg/alarm/", ProductId/binary, "/", Devaddr/binary, "/#">>
|
||||
end;
|
||||
_ ->
|
||||
<<"$dg/user/", "test/#">>
|
||||
<<"$dg/alarm/", "test/#">>
|
||||
end;
|
||||
<<"trigger/mqtt/event">> ->
|
||||
case Params of
|
||||
@ -490,7 +490,7 @@ generateFrom(Trigger) ->
|
||||
<<"$events/", Mqtt/binary, "/", ProductId/binary, "/", Devaddr/binary, "/#">>
|
||||
end;
|
||||
_ ->
|
||||
<<"$dg/user/", "test/#">>
|
||||
<<"$dg/alarm/", "test/#">>
|
||||
end;
|
||||
<<"trigger/timer">> ->
|
||||
<<"$dg/alarm/", "test/#">>;
|
||||
|
Loading…
Reference in New Issue
Block a user