fix 查询优化
This commit is contained in:
@@ -51,8 +51,8 @@ public class GainfosController : ControllerBase
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="code"></param>
|
/// <param name="code"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPost("page-all")]
|
[HttpGet("page-all")]
|
||||||
public async Task<Pagination<GainfoAllPageResponse>> GetPageByCodeAsync([FromBody] string code)
|
public async Task<Pagination<GainfoAllPageResponse>> GetPageByCodeAsync(string code)
|
||||||
{
|
{
|
||||||
return await _gainfoService.GetPageByCodeAsync(code);
|
return await _gainfoService.GetPageByCodeAsync(code);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -297,6 +297,7 @@ public class OrderService : BaseOrderService, IOrderService
|
|||||||
var pageResult = await DbContext.Queryable<CanteenOrderEntity>().Where(x => x.UserNo == gainfo.No)
|
var pageResult = await DbContext.Queryable<CanteenOrderEntity>().Where(x => x.UserNo == gainfo.No)
|
||||||
.LeftJoin<BusinessPlaceEntity>((x, bplace) => x.BusinessPlaceCode == bplace.Code)
|
.LeftJoin<BusinessPlaceEntity>((x, bplace) => x.BusinessPlaceCode == bplace.Code)
|
||||||
.Where(x => x.ApplicationType == CanteenApplicaitonTypeEnumType.Booking)
|
.Where(x => x.ApplicationType == CanteenApplicaitonTypeEnumType.Booking)
|
||||||
|
.OrderBy(x => x.CreateTime, OrderByType.Desc)
|
||||||
.Select((x, bplace) => new OrderAggregationResponse
|
.Select((x, bplace) => new OrderAggregationResponse
|
||||||
{
|
{
|
||||||
No = x.No,
|
No = x.No,
|
||||||
|
|||||||
Reference in New Issue
Block a user