Beispiel #1
0
        public async Task <InfoModel <TableOutputReportInfo> > GetListPageLikeName([FromForm] string name)
        {
            var list = await ContentContext.GetListPageLikeName(
                HttpContext.RequestServices,
                new PageInfo(0, 10000),
                name);

            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,
                        };
                    }),
                },
            });
        }