/// <summary> /// 修改菜单 /// </summary> /// <param name="sysMenu"></param> public async Task <bool> UpdateMenu(SysMenu sysMenu) { sysMenu.UpdateDate = DateTime.Now; //var model = await _menuRepositoty.GetModelAsync(sysMenu.Id); return(await _menuRepositoty.UpdateNotQueryAsync(sysMenu, x => x.Name, x => x.APIAddress, x => x.UrlAddress, x => x.ParentId, x => x.Sort, x => x.Memo, x => x.Icon, x => x.UpdateDate, x => x.UpdateId, x => x.ParentIdArr) > 0); //return await _menuRepositoty.UpdateAsync(model); }
/// <summary> /// 修改菜单 /// </summary> /// <param name="sysMenu"></param> public async Task <bool> UpdateMenu(SysMenu sysMenu) { sysMenu.UpdateDate = DateTime.Now; //var model = await _menuRepositoty.GetModelAsync(sysMenu.Id); var result = await _menuRepositoty.UpdateNotQueryAsync(sysMenu, x => x.Name, x => x.APIAddress, x => x.UrlAddress, x => x.ParentId, x => x.Sort, x => x.Memo, x => x.Icon, x => x.UpdateDate, x => x.UpdateId, x => x.ParentIdArr) > 0; var menus = await _menuRepositoty.GetAllListAsync(x => x.IsDrop == false); //_redisCacheManager.Remove("Menu"); //_redisCacheManager.Set("Menu", menus); //await RestMenuCache();//菜单进行修改重置缓存 return(result); //return await _menuRepositoty.UpdateAsync(model); }