/// <summary> /// 获取用户对应的菜单信息 /// </summary> /// <returns>菜单列表</returns> public BasicResponse <List <MenuInfo> > GetUserMenus(UserMenusGetRequest userrequest) { BasicResponse <List <MenuInfo> > Result = new BasicResponse <List <MenuInfo> >(); List <MenuInfo> menuList = new List <MenuInfo>(); try { List <MenuModel> menuModelList = _Repository.GetUserMenus(userrequest.userCode, userrequest.MenuType); menuList = ObjectConverter.CopyList <MenuModel, MenuInfo>(menuModelList).ToList(); Result.Data = menuList; } catch (System.Exception ex) { ThrowException("GetUserMenus", ex); } return(Result); }
public BasicResponse <List <MenuInfo> > GetUserMenus(UserMenusGetRequest userrequest) { return(_userService.GetUserMenus(userrequest)); }
/// <summary> /// 获取用户对应的菜单信息 /// </summary> /// <returns>菜单列表</returns> public BasicResponse <List <MenuInfo> > GetUserMenus(UserMenusGetRequest userrequest) { var responseStr = HttpClientHelper.Post(Webapi + "/v1/User/GetUserMenus?token=" + Token, JSONHelper.ToJSONString(userrequest)); return(JSONHelper.ParseJSONString <BasicResponse <List <MenuInfo> > >(responseStr)); }