public ActionResult GetShareFileList(GetShareFileListInput input)
        {
            input.UserID = Session["UserID"].ToString();
            var output = fileShareService.GetShareFileList(input);

            return(Json(new { code = "0", msg = "", count = output.Count, data = output.Items }, JsonRequestBehavior.AllowGet));
        }
        public GetShareFileListOutput GetShareFileList(GetShareFileListInput input)
        {
            var query = from shareuser in _context.FileUsers
                        join personalFile in _context.PersonalFiles on shareuser.FileId equals personalFile.Id
                        join document in _context.DocumentInfos on personalFile.DocumentID equals document.Id
                        where shareuser.UserId == input.UserID
                        select new FileListDto
            {
                Id             = personalFile.Id,
                DocumentID     = personalFile.DocumentID,
                Size           = document.Size,
                FileName       = document.FileName,
                Permission     = shareuser.Permission,
                CreateUserName = personalFile.CreateUserName,
                ModifyUserName = personalFile.ModifyUserName,
                TempTime       = personalFile.ModifyTime,
                Path           = document.Path,
                RelativePath   = document.RelativePath
            };

            if (!string.IsNullOrEmpty(input.FileName))
            {
                query = query.Where(a => a.FileName.Contains(input.FileName));
            }

            var count   = query.Count();
            var tmpList = query.OrderBy(a => a.Id).Skip(input.Limit * (input.Page - 1)).Take(input.Limit).ToList();

            foreach (var item in tmpList)
            {
                item.ModifyTime = item.TempTime.ToString("yyyy-MM-dd HH:mm:ss");
            }

            return(new GetShareFileListOutput
            {
                Count = count,
                Items = tmpList
            });
        }