mirror of
https://gitee.com/dgiiot/dgiot.git
synced 2024-11-29 18:57:41 +08:00
WIP:
This commit is contained in:
parent
1898ebea68
commit
f80b160013
62
CHANGELOG.md
62
CHANGELOG.md
@ -1,62 +0,0 @@
|
||||
## [4.3.3](https://github.com/dgiot/dgiot/compare/v4.3.2...v4.3.3) (2021-09-18)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* shouyinchengchannel cType ([442bee6](https://github.com/dgiot/dgiot/commit/442bee6c8a104ea9e5c588de549899436a0c99bd))
|
||||
* test ([cf09d38](https://github.com/dgiot/dgiot/commit/cf09d384cbae75e22a7332145bf6173c9de6d397))
|
||||
* test change log ([1d03322](https://github.com/dgiot/dgiot/commit/1d033226a84d78d1d250b22c05907cfb5444c228))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* ... ([d285393](https://github.com/dgiot/dgiot/commit/d2853938f1a13c45ecebb3a38142e2207ea802cf))
|
||||
|
||||
|
||||
|
||||
## [4.3.2](https://github.com/dgiot/dgiot/compare/v4.3.1...v4.3.2) (2021-09-13)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* addtd files ([c91a199](https://github.com/dgiot/dgiot/commit/c91a1993cd06777eb9304a07068ef1000f20aa00))
|
||||
* device_card ([50914b4](https://github.com/dgiot/dgiot/commit/50914b4bbefb9fcdf5049d5c4a36cac21819786f))
|
||||
* devicelog ([e747cee](https://github.com/dgiot/dgiot/commit/e747cee225e37f1050026781fe89418b19dadc7e))
|
||||
* igore rebar.config ([5e61214](https://github.com/dgiot/dgiot/commit/5e61214789aa382f6a8be126830b14c3c834a1cc))
|
||||
* parse.conf ([488c12e](https://github.com/dgiot/dgiot/commit/488c12e793fa2b94acfa01d0585072ca3a47d275))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* add acl to log ([2533081](https://github.com/dgiot/dgiot/commit/2533081a08a64203d1a3b17090bd3dc53497d8b2))
|
||||
* add dgiot log ([59b9906](https://github.com/dgiot/dgiot/commit/59b9906bd10ebb42c0439967c3989d1cdd6b9d29))
|
||||
* ssl ([f673266](https://github.com/dgiot/dgiot/commit/f6732665fd737a34147d06998f5328e605933906))
|
||||
* xiufubug ([f4c9d75](https://github.com/dgiot/dgiot/commit/f4c9d75653f789a07e700574deadaddd645b6f36))
|
||||
|
||||
|
||||
|
||||
## [4.3.1](https://github.com/dgiot/dgiot/compare/v4.3.0...v4.3.1) (2021-08-30)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* get_actions ([cb81e42](https://github.com/dgiot/dgiot/commit/cb81e42a6a94e18fe5e2e74a243240a4a23fd0bc))
|
||||
* get_channel params ([be0409b](https://github.com/dgiot/dgiot/commit/be0409b11b8c27e55d56f1a70a38b2a452e550e9))
|
||||
* get_resources ([2e218ed](https://github.com/dgiot/dgiot/commit/2e218edd97efe5621bd0463b4a4c7652535686de))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* 迁移脚本 && 字段修å值重复 ([1d69ba7](https://github.com/dgiot/dgiot/commit/1d69ba76facb9a4caab218c240eef750258bc4f1))
|
||||
* api get_table ([2a3606d](https://github.com/dgiot/dgiot/commit/2a3606dd8ded698c3003e7cef0a839f1807b543a))
|
||||
* get_maintenanceid ([195e43c](https://github.com/dgiot/dgiot/commit/195e43ccf2482af799d80362b88a23c581f2eaed))
|
||||
* get_provider ([ebb5c57](https://github.com/dgiot/dgiot/commit/ebb5c571c4a20c916fcafb091b90aa546d7954d4))
|
||||
* scripts ([810bfe5](https://github.com/dgiot/dgiot/commit/810bfe5fce8f39a536f56d1952649973af810012))
|
||||
* swagger description ([3bdb162](https://github.com/dgiot/dgiot/commit/3bdb162d0a4057a78a1e45e47ba04dbb91473ae2))
|
||||
|
||||
|
||||
|
||||
# 4.3.0 (2021-05-27)
|
||||
|
||||
|
||||
|
@ -55,7 +55,7 @@
|
||||
"description": ""
|
||||
}
|
||||
},
|
||||
"summary": "解码",
|
||||
"summary": "编码",
|
||||
"tags": [
|
||||
"gb26875"
|
||||
]
|
||||
|
@ -90,7 +90,7 @@ do_request(get_decoder, #{<<"buff">> := Buff}, _Context, _Req) ->
|
||||
do_request(post_encoder, Body, _Context, _Req) ->
|
||||
io:format("Body ~p~n", [Body]),
|
||||
R = dgiot_gb26875_decoder:to_frame(Body),
|
||||
{ok, R};
|
||||
{ok, #{<<"buff">> => dgiot_utils:binary_to_hex(R)}};
|
||||
|
||||
|
||||
%% PumpTemplet 概要: 新增报告模板 描述:新增报告模板
|
||||
|
@ -21,5 +21,5 @@ umeng.appkey = 5f8bfc1780455950e4ad0482
|
||||
umeng.masterkey = ilkx2mnd2ec9u0t4h77qnx0bopy46bso
|
||||
|
||||
#微信公众号
|
||||
wechat.appid = wx15f5652fads254
|
||||
wechat.secret = 4a28e7ddfsd44efd8fa46adsffdsde7de
|
||||
wechat.appid = wxb37f3990d2424ea0
|
||||
wechat.secret = 0c8b9e229ebe48c6878727a9d2e0263d
|
||||
|
@ -44,8 +44,8 @@ post_sns(UserName, Password, OpenId) ->
|
||||
{error, <<OpenId/binary, " is bind ", Name/binary>>};
|
||||
_ ->
|
||||
case dgiot_parse:login(UserName, Password) of
|
||||
{ok, #{<<"objectId">> := _UserId, <<"tag">> := #{<<"wechat">> := #{<<"openid">> := OPENID}}}} when size(OPENID) > 0 ->
|
||||
{error, <<UserName/binary, "is bind">>};
|
||||
%% {ok, #{<<"objectId">> := _UserId, <<"tag">> := #{<<"wechat">> := #{<<"openid">> := OPENID}}}} when size(OPENID) > 0 ->
|
||||
%% {error, <<UserName/binary, "is bind">>};
|
||||
{ok, #{<<"objectId">> := UserId, <<"tag">> := Tag, <<"username">> := Name}} ->
|
||||
dgiot_parse:update_object(<<"_User">>, UserId, #{<<"tag">> => Tag#{<<"wechat">> => #{<<"openid">> => OpenId}}}),
|
||||
{ok, UserInfo} = dgiot_parse_handler:create_session(UserId, dgiot_auth:ttl(), Name),
|
||||
|
@ -115,7 +115,15 @@ init(?TYPE, ChannelId, #{
|
||||
<<"product">> := Products,
|
||||
<<"dtutype">> := Dtutype
|
||||
} = _Args) ->
|
||||
[{ProdcutId, App} | _] = get_app(Products),
|
||||
{ProdcutId, App} =
|
||||
case get_app(Products) of
|
||||
[{ProdcutId1, App1} | _] ->
|
||||
{ProdcutId1, App1};
|
||||
[] ->
|
||||
{<<>>, <<>>};
|
||||
_ ->
|
||||
{<<>>, <<>>}
|
||||
end,
|
||||
{Header, Len} = get_header(Regular),
|
||||
State = #state{
|
||||
id = ChannelId,
|
||||
|
@ -120,14 +120,14 @@ get_deviceid(ProdcutId, DevAddr) ->
|
||||
|
||||
create_device(DeviceId, ProductId, DTUMAC, DTUIP, Dtutype) ->
|
||||
case dgiot_parse:get_object(<<"Product">>, ProductId) of
|
||||
{ok, #{<<"ACL">> := Acl, <<"devType">> := DevType}} ->
|
||||
{ok, #{<<"ACL">> := Acl, <<"devType">> := DevType,<<"name">> := ProductName}} ->
|
||||
case dgiot_parse:get_object(<<"Device">>, DeviceId) of
|
||||
{ok, #{<<"devaddr">> := _GWAddr}} ->
|
||||
dgiot_parse:update_object(<<"Device">>, DeviceId, #{<<"ip">> => DTUIP, <<"status">> => <<"ONLINE">>});
|
||||
_ ->
|
||||
dgiot_device:create_device(#{
|
||||
<<"devaddr">> => DTUMAC,
|
||||
<<"name">> => <<Dtutype/binary, DTUMAC/binary>>,
|
||||
<<"name">> => <<ProductName/binary, DTUMAC/binary>>,
|
||||
<<"ip">> => DTUIP,
|
||||
<<"isEnable">> => true,
|
||||
<<"product">> => ProductId,
|
||||
|
Loading…
Reference in New Issue
Block a user