fix: role

This commit is contained in:
dawnwinterLiu 2023-09-06 21:24:40 +08:00
parent 29c920ce95
commit 43913ba5d3
5 changed files with 26 additions and 22 deletions

View File

@ -393,7 +393,6 @@
],
"type": "tabs",
"mountOnEnter": true
},
{}
}
]
}

View File

@ -12,6 +12,11 @@ aliyun.accessKeySecret= WsVErdNZsfjX4PUaQZ4KkALT2Lc98o
aliyun.uploadCallbackUrl= http://127.0.0.1:8081
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
#百度地图纠偏值
@ -20,28 +25,27 @@ baidumap.latoffset = 0.00000
#友盟消息推送
umeng.appkey = 5f8bfc1780455950e4ad0482
umeng.masterkey = ilkx2mnd2ec9u0t4h77qnx0bopy46bso
umeng.appkey = 5f8bfc13210e4ad0482
umeng.masterkey = il312nx0bopy46bso
#微信小程序
wechat.appid = wx420c79dsac7a
wechat.secret = 5c0a80633afads96efd198161b4cda8
wechat.appid = wx342213134584
wechat.secret = 14a32132143ab6490ff
#微信公众号
wechatpublic.appid = wx71cffdsabdcd3
wechatpublic.secret = 630c2cb859448fa10d9c11cedd0afc3e
wechatpublic.appid = wx3421231234bdcd3
wechatpublic.secret = 6332142131244cedd0afc3e
#服务商户号
wechat.sp_mchid = 1641fdsa
wechat.sp_mchid = 164123456
#子商户号
wechat.sub_mchid = 164sad335
wechat.sub_mchid = 164123456
#商户API证书序列号
wechat.serial_no = 314D2F0Cfdsa7BC47D6E84B7C57
wechat.serial_no = 3431213443505AC43223C57
#商户API v3密钥
wechat.apiv3 = 05D4383414684fdsE898647371
wechat.apiv3 = 8291DL3414684E9A9459KP8AYV647371
# jwt
jwt.algorithm = rs256
@ -53,5 +57,5 @@ dgiot_api.bridge_url = https://prod.dgiotcloud.cn
# onenet
onenet.server = https://prod.dgiotcloud.cn
onenet.appid = c95fdsaa6ec7
onenet.secret = TTY4NDdsafdsjAyNTU1ODI4MTc5
onenet.appid = c95cca6ec7
onenet.secret = TTY4NDMyMTExNjAyNTU1ODI4MTc5

View File

@ -146,7 +146,7 @@ test_email() ->
<<"from">> => <<"18257190166@163.com">>,
<<"to">> => <<"344896904@qq.com">>,
<<"subject">> => <<"测试邮件"/utf8>>,
<<"fromdes">> => <<" <18257190166@163.com>"/utf8>>,
<<"fromdes">> => <<" <18257190166@163.com>"/utf8>>,
<<"todes">> => <<"刘 <344896904@qq.com>"/utf8>>,
<<"data">> => <<"刘 中文测试 欢迎访问 https://github.com/dgiot "/utf8>>,
<<"relay">> => <<"smtp.163.com">>,

View File

@ -212,7 +212,7 @@ post_role(#{<<"tempname">> := TempName, <<"parent">> := Parent, <<"depname">> :=
<<"roles">> => [maps:get(<<"name">>, ParentInfo)]
},
create_role(Role);
{error, What} ->
{_, What} ->
{error, What}
end.
@ -237,7 +237,7 @@ create_role(#{<<"name">> := Name} = Role) ->
{error, Reason}
end;
{ok, #{<<"objectId">> := RoleId}} ->
{error, #{<<"msg">> => <<"role is exist">>}}
{error, #{<<"objectId">> => RoleId, <<"msg">> => <<"role is exist">>}}
end.
put_role(#{<<"objectId">> := RoleId} = Role, SessionToken) ->

View File

@ -48,7 +48,7 @@
get_masterDataId/1,
get_metaDataId/1,
get_gitid/2,
get_orderid/2
get_orderid/3
]).
@ -88,8 +88,8 @@ get_deviceid(ProductId, DevAddr) ->
DeviceId.
get_orderid(Device, Schedule) ->
<<DId:10/binary, _/binary>> = dgiot_utils:to_md5(<<"Order", Device/binary, Schedule/binary>>),
get_orderid(Device, Schedule, Type) ->
<<DId:10/binary, _/binary>> = dgiot_utils:to_md5(<<"Order", Device/binary, Schedule/binary, Type/binary>>),
DId.
get_userid(UserName) ->
@ -397,7 +397,8 @@ get_objectid(Class, Map) ->
<<"Order">> ->
#{<<"objectId">> := Device} = maps:get(<<"device">>, 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#{
<<"objectId">> => DId
};