mirror of
https://gitee.com/dgiiot/dgiot.git
synced 2024-12-02 12:18:30 +08:00
fix: tdengine get_appdata bug
This commit is contained in:
parent
9d7853b29b
commit
435a2f1e30
@ -228,10 +228,10 @@ get_appdata(Channel, ProductId, DeviceId, _Args) ->
|
||||
_ ->
|
||||
TableName = ?Table(DeviceId),
|
||||
case dgiot_tdengine:get_appdata(Channel, TableName, #{<<"db">> => ProductId}) of
|
||||
{ok, #{<<"results">> := Results}} ->
|
||||
{ok, #{<<"results">> := Results}} when length(Results) > 0->
|
||||
Chartdata = get_app(ProductId, Results, DeviceId),
|
||||
{ok, #{<<"data">> => Chartdata}};
|
||||
{error, _Reason} ->
|
||||
_ ->
|
||||
Chartdata = get_app(ProductId, [#{}], DeviceId),
|
||||
{ok, #{<<"data">> => Chartdata}}
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user