mirror of
https://gitee.com/dgiiot/dgiot.git
synced 2024-11-29 18:57:41 +08:00
fix: role
This commit is contained in:
parent
29c920ce95
commit
43913ba5d3
@ -393,7 +393,6 @@
|
|||||||
],
|
],
|
||||||
"type": "tabs",
|
"type": "tabs",
|
||||||
"mountOnEnter": true
|
"mountOnEnter": true
|
||||||
},
|
}
|
||||||
{}
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -12,6 +12,11 @@ aliyun.accessKeySecret= WsVErdNZsfjX4PUaQZ4KkALT2Lc98o
|
|||||||
aliyun.uploadCallbackUrl= http://127.0.0.1:8081
|
aliyun.uploadCallbackUrl= http://127.0.0.1:8081
|
||||||
aliyun.uploadHost= http://dgiotpump.oss-cn-shanghai.aliyuncs.com
|
aliyun.uploadHost= http://dgiotpump.oss-cn-shanghai.aliyuncs.com
|
||||||
|
|
||||||
|
# 阿里云工业互联网
|
||||||
|
inplat.host = http://api.inplat.com.cn
|
||||||
|
inplat.appkey = 202308080
|
||||||
|
inplat.appsecret = MtLbnyAgIC26czYlVPBlRO8peEAcdeSw
|
||||||
|
|
||||||
#百度地图
|
#百度地图
|
||||||
baidumap.appkey = 0twrgSghSF1Q6zUvvYdUu2KFhFiGdbm5
|
baidumap.appkey = 0twrgSghSF1Q6zUvvYdUu2KFhFiGdbm5
|
||||||
#百度地图纠偏值
|
#百度地图纠偏值
|
||||||
@ -20,28 +25,27 @@ baidumap.latoffset = 0.00000
|
|||||||
|
|
||||||
|
|
||||||
#友盟消息推送
|
#友盟消息推送
|
||||||
umeng.appkey = 5f8bfc1780455950e4ad0482
|
umeng.appkey = 5f8bfc13210e4ad0482
|
||||||
umeng.masterkey = ilkx2mnd2ec9u0t4h77qnx0bopy46bso
|
umeng.masterkey = il312nx0bopy46bso
|
||||||
|
|
||||||
#微信小程序
|
#微信小程序
|
||||||
wechat.appid = wx420c79dsac7a
|
wechat.appid = wx342213134584
|
||||||
wechat.secret = 5c0a80633afads96efd198161b4cda8
|
wechat.secret = 14a32132143ab6490ff
|
||||||
|
|
||||||
#微信公众号
|
#微信公众号
|
||||||
wechatpublic.appid = wx71cffdsabdcd3
|
wechatpublic.appid = wx3421231234bdcd3
|
||||||
wechatpublic.secret = 630c2cb859448fa10d9c11cedd0afc3e
|
wechatpublic.secret = 6332142131244cedd0afc3e
|
||||||
|
|
||||||
#服务商户号
|
#服务商户号
|
||||||
wechat.sp_mchid = 1641fdsa
|
wechat.sp_mchid = 164123456
|
||||||
|
|
||||||
#子商户号
|
#子商户号
|
||||||
wechat.sub_mchid = 164sad335
|
wechat.sub_mchid = 164123456
|
||||||
|
|
||||||
#商户API证书序列号
|
#商户API证书序列号
|
||||||
wechat.serial_no = 314D2F0Cfdsa7BC47D6E84B7C57
|
wechat.serial_no = 3431213443505AC43223C57
|
||||||
|
|
||||||
#商户API v3密钥
|
#商户API v3密钥
|
||||||
wechat.apiv3 = 05D4383414684fdsE898647371
|
wechat.apiv3 = 8291DL3414684E9A9459KP8AYV647371
|
||||||
|
|
||||||
# jwt
|
# jwt
|
||||||
jwt.algorithm = rs256
|
jwt.algorithm = rs256
|
||||||
@ -53,5 +57,5 @@ dgiot_api.bridge_url = https://prod.dgiotcloud.cn
|
|||||||
|
|
||||||
# onenet
|
# onenet
|
||||||
onenet.server = https://prod.dgiotcloud.cn
|
onenet.server = https://prod.dgiotcloud.cn
|
||||||
onenet.appid = c95fdsaa6ec7
|
onenet.appid = c95cca6ec7
|
||||||
onenet.secret = TTY4NDdsafdsjAyNTU1ODI4MTc5
|
onenet.secret = TTY4NDMyMTExNjAyNTU1ODI4MTc5
|
||||||
|
@ -146,7 +146,7 @@ test_email() ->
|
|||||||
<<"from">> => <<"18257190166@163.com">>,
|
<<"from">> => <<"18257190166@163.com">>,
|
||||||
<<"to">> => <<"344896904@qq.com">>,
|
<<"to">> => <<"344896904@qq.com">>,
|
||||||
<<"subject">> => <<"测试邮件"/utf8>>,
|
<<"subject">> => <<"测试邮件"/utf8>>,
|
||||||
<<"fromdes">> => <<"徐 <18257190166@163.com>"/utf8>>,
|
<<"fromdes">> => <<"刘 <18257190166@163.com>"/utf8>>,
|
||||||
<<"todes">> => <<"刘 <344896904@qq.com>"/utf8>>,
|
<<"todes">> => <<"刘 <344896904@qq.com>"/utf8>>,
|
||||||
<<"data">> => <<"刘 中文测试 欢迎访问 https://github.com/dgiot "/utf8>>,
|
<<"data">> => <<"刘 中文测试 欢迎访问 https://github.com/dgiot "/utf8>>,
|
||||||
<<"relay">> => <<"smtp.163.com">>,
|
<<"relay">> => <<"smtp.163.com">>,
|
||||||
|
@ -212,7 +212,7 @@ post_role(#{<<"tempname">> := TempName, <<"parent">> := Parent, <<"depname">> :=
|
|||||||
<<"roles">> => [maps:get(<<"name">>, ParentInfo)]
|
<<"roles">> => [maps:get(<<"name">>, ParentInfo)]
|
||||||
},
|
},
|
||||||
create_role(Role);
|
create_role(Role);
|
||||||
{error, What} ->
|
{_, What} ->
|
||||||
{error, What}
|
{error, What}
|
||||||
end.
|
end.
|
||||||
|
|
||||||
@ -237,7 +237,7 @@ create_role(#{<<"name">> := Name} = Role) ->
|
|||||||
{error, Reason}
|
{error, Reason}
|
||||||
end;
|
end;
|
||||||
{ok, #{<<"objectId">> := RoleId}} ->
|
{ok, #{<<"objectId">> := RoleId}} ->
|
||||||
{error, #{<<"msg">> => <<"role is exist">>}}
|
{error, #{<<"objectId">> => RoleId, <<"msg">> => <<"role is exist">>}}
|
||||||
end.
|
end.
|
||||||
|
|
||||||
put_role(#{<<"objectId">> := RoleId} = Role, SessionToken) ->
|
put_role(#{<<"objectId">> := RoleId} = Role, SessionToken) ->
|
||||||
|
@ -48,7 +48,7 @@
|
|||||||
get_masterDataId/1,
|
get_masterDataId/1,
|
||||||
get_metaDataId/1,
|
get_metaDataId/1,
|
||||||
get_gitid/2,
|
get_gitid/2,
|
||||||
get_orderid/2
|
get_orderid/3
|
||||||
]).
|
]).
|
||||||
|
|
||||||
|
|
||||||
@ -88,8 +88,8 @@ get_deviceid(ProductId, DevAddr) ->
|
|||||||
DeviceId.
|
DeviceId.
|
||||||
|
|
||||||
|
|
||||||
get_orderid(Device, Schedule) ->
|
get_orderid(Device, Schedule, Type) ->
|
||||||
<<DId:10/binary, _/binary>> = dgiot_utils:to_md5(<<"Order", Device/binary, Schedule/binary>>),
|
<<DId:10/binary, _/binary>> = dgiot_utils:to_md5(<<"Order", Device/binary, Schedule/binary, Type/binary>>),
|
||||||
DId.
|
DId.
|
||||||
|
|
||||||
get_userid(UserName) ->
|
get_userid(UserName) ->
|
||||||
@ -397,7 +397,8 @@ get_objectid(Class, Map) ->
|
|||||||
<<"Order">> ->
|
<<"Order">> ->
|
||||||
#{<<"objectId">> := Device} = maps:get(<<"device">>, Map, #{<<"objectId">> => <<"">>}),
|
#{<<"objectId">> := Device} = maps:get(<<"device">>, Map, #{<<"objectId">> => <<"">>}),
|
||||||
#{<<"objectId">> := Schedule} = maps:get(<<"schedule">>, Map, #{<<"objectId">> => <<"">>}),
|
#{<<"objectId">> := Schedule} = maps:get(<<"schedule">>, Map, #{<<"objectId">> => <<"">>}),
|
||||||
<<DId:10/binary, _/binary>> = dgiot_utils:to_md5(<<"Order", Device/binary, Schedule/binary>>),
|
Type = maps:get(<<"type">>, Map, <<>>),
|
||||||
|
<<DId:10/binary, _/binary>> = dgiot_utils:to_md5(<<"Order", Device/binary, Schedule/binary, Type/binary>>),
|
||||||
Map#{
|
Map#{
|
||||||
<<"objectId">> => DId
|
<<"objectId">> => DId
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user