Esempio n. 1
0
 public async Task <IActionResult> GetUserPosterDetail([FromBody] ParamUserPosterDetail param)
 {
     return(await ActionWrapAsync(async() =>
     {
         ResultData <RpsData <IEnumerable <RpsPosterDetail> > > result = new ResultData <RpsData <IEnumerable <RpsPosterDetail> > >();
         param = HttpContext.User.GetUserBase <ParamUserPosterDetail>(param);
         result.Data = await _otherService.GetUserPosterDetail(param);
         return result;
     }));
 }
Esempio n. 2
0
        public async Task <RpsData <IEnumerable <RpsPosterDetail> > > GetUserPosterDetail(ParamUserPosterDetail param)
        {
            var result = await _context.PosterGalleries.AsNoTracking().Where(x => x.Gate == param.Gate).GroupJoin(
                _context.Posters.AsNoTracking().Where(x => x.UserId == param.Id), x => x.Id, y => y.PosterId, (x, y) =>
                new RpsPosterDetail()
            {
                Icon     = x.Icon,
                HaveIt   = y.Any(),
                Name     = x.Name,
                PosterId = x.Id
            }).ToListAsync();

            return(RpsData <IEnumerable <RpsPosterDetail> > .Ok(result));
        }
Esempio n. 3
0
 public async Task <RpsData <IEnumerable <RpsPosterDetail> > > GetUserPosterDetail(ParamUserPosterDetail param)
 {
     return(await _otherRepository.GetUserPosterDetail(param));
 }