/// <summary> /// 热门分类菜单查询 /// </summary> /// <returns></returns> public HttpResponseMessage QueryArtHotMenu(ArtHotMenuParams artHotMenuParams) { BaseJson <List <HotMenuModel> > resultMsg = new BaseJson <List <HotMenuModel> > { Status = (int)JsonObjectStatus.Error, Message = "服务器未知错误。", Data = null }; Logger(typeof(GallerMangerApiController), artHotMenuParams.TryToJson(), "GallerMangerApi/QueryArtHotMenu链接成功", () => { string[] itemName = { "A", "B", "C" }; if (!string.IsNullOrEmpty(artHotMenuParams.ItemName)) { itemName = new string[] { artHotMenuParams.ItemName }; } List <HotMenuModel> list = TKApiBLL.QueryHotMenu(itemName); resultMsg = new BaseJson <List <HotMenuModel> > { Status = (int)JsonObjectStatus.Success, Data = list, Message = JsonObjectStatus.Success.GetEnumText(), BackUrl = null }; }, e => { resultMsg = new BaseJson <List <HotMenuModel> > { Status = (int)JsonObjectStatus.Exception, Data = null, Message = JsonObjectStatus.Exception.GetEnumText() + ",异常信息:" + e.Message, BackUrl = null }; }); return(resultMsg.TryToJson().ToHttpResponseMessage()); }
public HttpResponseMessage QueryArtHotList(ArtHotListParams artHotListParams) { BaseJson4Page <ImageMenuInfoModel> resultMsg = new BaseJson4Page <ImageMenuInfoModel> { Status = (int)JsonObjectStatus.Error, Message = "服务器未知错误。", Data = null }; Logger(typeof(GallerMangerApiController), artHotListParams.TryToJson(), "GallerMangerApi/QueryArtHotList链接成功", () => { int totalrows = 0, totalpage = 0; if (string.IsNullOrEmpty(artHotListParams.menuName)) { resultMsg = new BaseJson4Page <ImageMenuInfoModel> { Status = (int)JsonObjectStatus.Fail, Data = null, Message = JsonObjectStatus.Fail.GetEnumText() + "GallerMangerApi/QueryArtHotList参数错误: ", BackUrl = null }; } List <ImageMenuInfoModel> list = TKApiBLL.QueryHotArtList(artHotListParams.PageIndex == 0 ? 1 : artHotListParams.PageIndex, artHotListParams.PageSize == 0 ? 10 : artHotListParams.PageSize, artHotListParams.menuName, out totalrows, out totalpage, artHotListParams.PeriodsNumber); PageData <ImageMenuInfoModel> pageData = new PageData <ImageMenuInfoModel> { TotalRow = totalrows, TotalPage = totalpage, PageIndex = artHotListParams.PageIndex, Rows = list }; resultMsg = new BaseJson4Page <ImageMenuInfoModel> { Status = (int)JsonObjectStatus.Success, Data = pageData, Message = JsonObjectStatus.Success.GetEnumText(), BackUrl = null }; }, e => { resultMsg = new BaseJson4Page <ImageMenuInfoModel> { Status = (int)JsonObjectStatus.Exception, Data = null, Message = JsonObjectStatus.Exception.GetEnumText() + ",异常信息:" + e.Message, BackUrl = null }; }); return(resultMsg.TryToJson().ToHttpResponseMessage()); }
public HttpResponseMessage QueryArtInfo(ArtInfoParams artInfoParams) { BaseJson <ImageInfoModel> resultMsg = new BaseJson <ImageInfoModel> { Status = (int)JsonObjectStatus.Error, Message = "服务器未知错误。", Data = null }; Logger(typeof(GallerMangerApiController), artInfoParams.TryToJson(), "GallerMangerApi/QueryArtInfo链接成功", () => { if (string.IsNullOrEmpty(artInfoParams.GalleryId) && string.IsNullOrEmpty(artInfoParams.ID) && string.IsNullOrEmpty(artInfoParams.PeriodsNumber)) { resultMsg = new BaseJson <ImageInfoModel> { Status = (int)JsonObjectStatus.Fail, Data = null, Message = JsonObjectStatus.Fail.GetEnumText() + "GallerMangerApi/QueryArtInfo参数错误: ", BackUrl = null }; } ImageInfoModel data = TKApiBLL.QueryArtInfo(artInfoParams); resultMsg = new BaseJson <ImageInfoModel> { Status = (int)JsonObjectStatus.Success, Data = data, Message = JsonObjectStatus.Success.GetEnumText(), BackUrl = null }; }, e => { resultMsg = new BaseJson <ImageInfoModel> { Status = (int)JsonObjectStatus.Exception, Data = null, Message = JsonObjectStatus.Exception.GetEnumText() + ",异常信息:" + e.Message, BackUrl = null }; }); return(resultMsg.TryToJson().ToHttpResponseMessage()); }
public HttpResponseMessage QuerAll(ArtListParams param) { BaseJson4Page <QueryAllDataModel> resultMsg = new BaseJson4Page <QueryAllDataModel> { Status = (int)JsonObjectStatus.Error, Message = "服务器未知错误。", Data = null }; Logger(typeof(GallerMangerApiController), param.TryToJson(), "GallerMangerApi/QuerAll链接成功", () => { int totalrows = 0, totalpage = 0; List <QueryAllDataModel> list = TKApiBLL.QueryAll(param.PageIndex == 0 ? 1 : param.PageIndex, param.PageSize == 0 ? 10 : param.PageSize, param.TryToJson(), out totalrows, out totalpage, param.PeriodsNumber); PageData <QueryAllDataModel> pageData = new PageData <QueryAllDataModel> { TotalRow = totalrows, TotalPage = totalpage, PageIndex = param.PageIndex, Rows = list }; resultMsg = new BaseJson4Page <QueryAllDataModel> { Status = (int)JsonObjectStatus.Success, Data = pageData, Message = JsonObjectStatus.Success.GetEnumText(), BackUrl = null }; }, e => { resultMsg = new BaseJson4Page <QueryAllDataModel> { Status = (int)JsonObjectStatus.Exception, Data = null, Message = JsonObjectStatus.Exception.GetEnumText() + ",异常信息:" + e.Message, BackUrl = null }; }); return(resultMsg.TryToJson().ToHttpResponseMessage()); }