[後端] 修改更新角色權限頁面權限api
This commit is contained in:
parent
61c8e79e9c
commit
fd79ba4df2
@ -596,20 +596,23 @@ namespace FrontendWebApi.ApiControllers
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
await backendRepository.ExecuteSql($"delete from role_auth where role_guid = '{post.SelectedRoleId}' and AuthCode like '%PF%'");
|
||||||
if (post.SaveCheckAuth.Count > 0)
|
if (post.SaveCheckAuth.Count > 0)
|
||||||
{
|
{
|
||||||
foreach (var item in post.SaveCheckAuth)
|
foreach (var item in post.SaveCheckAuth)
|
||||||
{
|
{
|
||||||
#region 新增權限
|
#region 新增權限
|
||||||
Dictionary<string, object> roleAuth = new Dictionary<string, object>();
|
{
|
||||||
roleAuth = new Dictionary<string, object>()
|
Dictionary<string, object> roleAuth = new Dictionary<string, object>();
|
||||||
{
|
roleAuth = new Dictionary<string, object>()
|
||||||
{ "@role_guid", post.SelectedRoleId},
|
{
|
||||||
{ "@AuthCode", item},
|
{ "@role_guid", post.SelectedRoleId},
|
||||||
{ "@created_by", myUser.userinfo_guid}
|
{ "@AuthCode", item},
|
||||||
};
|
{ "@created_by", myUser.userinfo_guid}
|
||||||
|
};
|
||||||
|
|
||||||
await backendRepository.AddOneByCustomTable(roleAuth, "role_auth");
|
await backendRepository.AddOneByCustomTable(roleAuth, "role_auth");
|
||||||
|
}
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user