|
@@ -258,6 +258,9 @@ namespace Hotline.Api.Controllers
|
|
|
.WhereIF(!string.IsNullOrEmpty(dto.CDPN), x => x.CDPN.Contains(dto.CDPN))
|
|
|
.WhereIF(dto.CallDirection != null, x => x.CallDirection == dto.CallDirection)
|
|
|
.WhereIF(dto.OnState != null, x => x.OnState == dto.OnState)
|
|
|
+ .WhereIF(!string.IsNullOrEmpty(dto.Gateway),x=>x.Gateway.Contains(dto.Gateway))
|
|
|
+ .WhereIF(dto.StartTime.HasValue, x => x.CreatedTime >= dto.StartTime)
|
|
|
+ .WhereIF(dto.EndTime.HasValue, x => x.CreatedTime <= dto.EndTime)
|
|
|
.OrderByDescending(x => x.CreatedTime)
|
|
|
.ToPagedListAsync(dto.PageIndex, dto.PageSize);
|
|
|
return new PagedDto<TrCallDto>(total, _mapper.Map<IReadOnlyList<TrCallDto>>(items));
|