public async Task <InfoModelList <OutPutContentInfoItem> > GetListAsync([FromBody] PageInfo pageInfo) { var list = await ContentContext.GetListPageWithStatus( HttpContext.RequestServices, pageInfo, Macro.TASK_COMPLETE); return(new InfoModelList <OutPutContentInfoItem>() { ListData = list.ConvertAll(T => { return new OutPutContentInfoItem() { Introduce = T.GetEntity().Introduce, Content = T.GetEntity().Content.HtmlDecode(), ContentId = T.GetKey(), CreateTiem = T.GetEntity().CreateDate.ToString("yyyy-MM-dd hh:mm:ss"), HeadImage = new TempFileInfo() { ServerDirPath = T.GetDownFileDir(), ServerFileName = T.GetEntity().Image, }, Title = T.GetEntity().Title }; }), PageInfo = pageInfo }); }
public async Task <InfoModel <TableOutputReportInfo> > GetListAsync([FromBody] TableOutputReportInput model) { var list = await ContentContext.GetListPageWithStatus( HttpContext.RequestServices, model.PageInfo, model.Status); return(new InfoModel <TableOutputReportInfo>() { Data = new TableOutputReportInfo() { ReportList = list.ConvertAll(T => { return new OutPutContentInfoItem() { Introduce = T.GetEntity().Introduce, Content = T.GetEntity().Content.HtmlDecode(), ContentId = T.GetKey(), CreateTiem = T.GetEntity().CreateDate.ToString("yyyy-MM-dd hh:mm:ss"), HeadImage = new TempFileInfo() { ServerDirPath = T.GetDownFileDir(), ServerFileName = T.GetEntity().Image, }, Title = T.GetEntity().Title, Status = T.GetEntity().Status, StstusName = HttpContext.RequestServices.GetDataTypeForConstant <ContentStatusType>().FindDataTypeForValue(T.GetEntity().Status) }; }), Page = model.PageInfo, ExamineList = HttpContext.RequestServices.GetDataTypeForConstant <ContentStatusType>().DataType.ConvertAll(T => { return new TypeForName <int, string>() { Id = T.Id, Name = T.Value }; }), }, }); }