예제 #1
0
        public async Task UpdateRoleMenu(UpdateRoleMenuInput input)
        {
            var roleId = input.RoleId;

            _roleMenuRepository.Delete(t => t.RoleId == roleId);
            var roleMenus = new List <RoleMenu>();

            foreach (var menuId in input.MenuIds)
            {
                await _roleMenuRepository.InsertAsync(new RoleMenu { RoleId = roleId, MenuId = menuId });
            }
            _cache.Remove(AdmConsts.ROLE_URI_CACHE);
        }
예제 #2
0
        public async Task <IActionResult> UpdateRoleMenu([FromBody] UpdateRoleMenuInput input)
        {
            await _roleService.UpdateRoleMenu(input);

            return(Ok(new { Status = true, Message = "更新成功" }));
        }