mirror of
https://gitee.com/dgiiot/dgiot.git
synced 2024-12-02 04:08:54 +08:00
fix: 修复生成sql错误
This commit is contained in:
parent
eaf881f048
commit
4f815d4e66
@ -501,25 +501,25 @@ generateSelect(Condition, _Trigger, _FROM) ->
|
||||
PropertyName = maps:get(<<"propertyName">>, Params, <<"test">>),
|
||||
case Acc of
|
||||
<<"">> ->
|
||||
PropertyName;
|
||||
<<"payload.", PropertyName/binary, " as ", PropertyName/binary>>;
|
||||
_ ->
|
||||
<<Acc/binary, ",\r\n ", PropertyName/binary>>
|
||||
<<Acc/binary, ",\r\n ", "payload.", PropertyName/binary, " as ", PropertyName/binary>>
|
||||
end;
|
||||
#{<<"uri">> := <<"condition/device/stateContinue">>, <<"params">> := Params} ->
|
||||
PropertyName = maps:get(<<"propertyName">>, Params, <<"test">>),
|
||||
case Acc of
|
||||
<<"">> ->
|
||||
PropertyName;
|
||||
<<"payload.", PropertyName/binary, " as ", PropertyName/binary>>;
|
||||
_ ->
|
||||
<<Acc/binary, ",\r\n ", PropertyName/binary>>
|
||||
<<Acc/binary, ",\r\n ", "payload.", PropertyName/binary, " as ", PropertyName/binary>>
|
||||
end;
|
||||
#{<<"uri">> := <<"condition/device/time">>, <<"params">> := Params} ->
|
||||
PropertyName = maps:get(<<"propertyName">>, Params, <<"test">>),
|
||||
case Acc of
|
||||
<<"">> ->
|
||||
PropertyName;
|
||||
<<"payload.", PropertyName/binary, " as ", PropertyName/binary>>;
|
||||
_ ->
|
||||
<<Acc/binary, ",\r\n ", PropertyName/binary>>
|
||||
<<Acc/binary, ",\r\n ", "payload.", PropertyName/binary, " as ", PropertyName/binary>>
|
||||
end;
|
||||
_ ->
|
||||
Acc
|
||||
|
Loading…
Reference in New Issue
Block a user