fix 查询条件

This commit is contained in:
2024-06-26 14:05:12 +08:00
parent ed39bd889a
commit 119e34f76b

View File

@@ -123,6 +123,7 @@ public class OrderService : BaseOrderService, IOrderService
var data = await DbContext.Queryable<GainfoMealEntity>()
.LeftJoin<GainfoEntity>((x, ga) => x.UserNo == ga.No)
.LeftJoin<DepartmentEntity>((x, ga, department) => ga.DepartmentNo == department.No)
.Where(x => x.UserNo == gainfo.No)
.Select((x, ga, department) => new OrderResultResponse
{
UserCode = ga.Code,
@@ -131,7 +132,7 @@ public class OrderService : BaseOrderService, IOrderService
DepartmentName = department.Name,
CurrentBalance = x.Balance
})
.FirstAsync();
.SingleAsync();
return new DefaultApiResult<OrderResultResponse>
{