public async Task <GetAllEmailHistoryResultDto> GetAllEmailHistoryInfoByRecipientId(string recipientId) { var listDto = await _context.GetByWhere(e => e.RecipientId.Equals(recipientId)); return(new GetAllEmailHistoryResultDto() { ResultListDto = ModelBindingService.CopyModelList <EmailHistoryInfoDto, HW_EmailHistoryInfo>(listDto), Count = listDto.Count() }); }
public async Task <GetAllEmailHistoryResultDto> GetAllEmailHistoryInfo() { var listDto = await _context.GetAll(); return(new GetAllEmailHistoryResultDto() { // 剔除创建时间和删除状态 ResultListDto = ModelBindingService.CopyModelList <EmailHistoryInfoDto, HW_EmailHistoryInfo>(listDto), Count = listDto.Count() }); }
public async Task <GetAllDevLoveInfoResultDto> GetAllDevLoveInfo() { var listDto = await _context.DevLoveInfo .Where(d => d.IsDeleted == 0) .ToListAsync(); return(new GetAllDevLoveInfoResultDto() { ResultListDto = ModelBindingService.CopyModelList <DevLoveInfoDto, DevLoveInfo>(listDto), Count = listDto.Count() }); }
public async Task <GetAllEmailHistoryResultDto> GetAllEmailHistoryInfo() { var listDto = await _context.EmailHistoryInfo .Where(e => e.IsDeleted == 0) .ToListAsync(); return(new GetAllEmailHistoryResultDto() { // 剔除创建时间和删除状态 ResultListDto = ModelBindingService.CopyModelList <EmailHistoryInfoDto, EmailHistoryInfo>(listDto), Count = listDto.Count() }); }
public async Task <ResultDto> AddPhoneReceiveInfo(List <AddPhoneReceiveInfoDto> modelList) { // 判断是否有未归还的手机 var result = await GetPhoneReceiveInfoByUserId(modelList[0].ReceiveUserID); if (result.PhoneModelList.Count > 0) { // 当前用户领取手机未归还,请先归还再做处理。 throw new Exception("The current user picks up the mobile phone and has not returned it. Please return it before processing."); } return(new ResultDto { Success = await _context.AddRange(ModelBindingService.CopyModelList <HW_PhoneReceiveInfo, AddPhoneReceiveInfoDto>(modelList)) }); }