海运出口列表查询修改为异步

usertest
ZR20090193-陈敬勇 5 months ago
parent 788977cd55
commit d89c1eb19b

@ -13,7 +13,7 @@ public interface ISeaExportService
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
DataResult<List<SeaExportRes>> GetListByPage(PageRequest request);
Task<DataResult<List<SeaExportRes>>> GetListByPage(PageRequest request);
/// <summary>

@ -207,12 +207,12 @@ public partial class SeaExportService : ISeaExportService
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
public DataResult<List<SeaExportRes>> GetListByPage(PageRequest request)
public async Task<DataResult<List<SeaExportRes>>> GetListByPage(PageRequest request)
{
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
//序列化查询条件
var whereList = db.ConfigQuery.Context.Utilities.JsonToConditionalModels(request.QueryCondition);
var data = tenantDb.Queryable<SeaExport>()
var data = await tenantDb.Queryable<SeaExport>()
.Where(whereList)
.Select<SeaExportRes>()
.Mapper(it =>
@ -229,7 +229,7 @@ public partial class SeaExportService : ISeaExportService
it.BillFeeStatus = feeStatus.IsNull() ? 0 : feeStatus.BillAuditStatus;
it.BillFeeStatusTime = feeStatus.IsNull() ? null : feeStatus.BillFeeStatusTime;
}
).ToQueryPage(request.PageCondition);
).ToQueryPageAsync(request.PageCondition);
return data;
}
/// <summary>

@ -35,9 +35,9 @@ public class SeaExportController : ApiController
/// <returns></returns>
[HttpPost]
[Route("GetSeaExportList")]
public DataResult<List<SeaExportRes>> GetSeaExportList([FromBody] PageRequest request)
public async Task<DataResult<List<SeaExportRes>>> GetSeaExportList([FromBody] PageRequest request)
{
var res = _invokeService.GetListByPage(request);
var res = await _invokeService.GetListByPage(request);
return res;
}

Loading…
Cancel
Save