[後端] 修改更新角色權限頁面權限api

This commit is contained in:
dev02 2023-07-25 17:49:51 +08:00
parent 61c8e79e9c
commit fd79ba4df2

View File

@ -596,11 +596,13 @@ namespace FrontendWebApi.ApiControllers
}
else
{
await backendRepository.ExecuteSql($"delete from role_auth where role_guid = '{post.SelectedRoleId}' and AuthCode like '%PF%'");
if (post.SaveCheckAuth.Count > 0)
{
foreach (var item in post.SaveCheckAuth)
{
#region
{
Dictionary<string, object> roleAuth = new Dictionary<string, object>();
roleAuth = new Dictionary<string, object>()
{
@ -610,6 +612,7 @@ namespace FrontendWebApi.ApiControllers
};
await backendRepository.AddOneByCustomTable(roleAuth, "role_auth");
}
#endregion
}
}