|
@@ -6,6 +6,7 @@ using XF.Domain.Exceptions;
|
|
|
using XF.Domain.Repository;
|
|
|
using Hotline.Repository.SqlSugar.Extensions;
|
|
|
using Hotline.Share.Dtos.Special;
|
|
|
+using Hotline.Orders;
|
|
|
|
|
|
namespace Hotline.Application.SpecialNumber
|
|
|
{
|
|
@@ -36,12 +37,12 @@ namespace Hotline.Application.SpecialNumber
|
|
|
/// <summary>
|
|
|
/// 特殊号码 - 列表
|
|
|
/// </summary>
|
|
|
- /// <param name="pagedDto"></param>
|
|
|
+ /// <param name="dto"></param>
|
|
|
/// <returns></returns>
|
|
|
- public async Task<(int, IList<SpecialNumberInfoDto>)> QueryAllSpecialNumberListAsync(SpecialNumberDto dto, CancellationToken cancellationToken)
|
|
|
+ public ISugarQueryable<Hotline.Special.SpecialNumber> QueryAllSpecialNumberListAsync(SpecialNumberDto dto)
|
|
|
{
|
|
|
//单表分页
|
|
|
- var (total, temp) = await _specialNumberRepository.Queryable()
|
|
|
+ var query = _specialNumberRepository.Queryable()
|
|
|
.WhereIF(!string.IsNullOrEmpty(dto.PhoneNumber), x => x.PhoneNumber.Contains(dto.PhoneNumber))
|
|
|
.WhereIF(!string.IsNullOrEmpty(dto.Notes), x => x.Notes.Contains(dto.Notes))
|
|
|
.WhereIF(!string.IsNullOrEmpty(dto.PoliticalIdentityValue), x => x.PoliticalIdentityValue == dto.PoliticalIdentityValue)
|
|
@@ -51,8 +52,8 @@ namespace Hotline.Application.SpecialNumber
|
|
|
.OrderByIF(dto is { SortField: "creationTime", SortRule: 0 }, x => x.CreationTime, OrderByType.Asc) //创建时间升序
|
|
|
.OrderByIF(dto is { SortField: "creationTime", SortRule: 1 }, x => x.CreationTime, OrderByType.Desc) //创建时间降序
|
|
|
.OrderByIF(string.IsNullOrEmpty(dto.SortField), x => x.CreationTime, OrderByType.Desc) //创建时间降序
|
|
|
- .ToPagedListAsync(dto.PageIndex, dto.PageSize, cancellationToken);
|
|
|
- return (total, _mapper.Map<IList<SpecialNumberInfoDto>>(temp));
|
|
|
+ ;
|
|
|
+ return query;
|
|
|
}
|
|
|
|
|
|
#endregion
|