fix gainfo.id空引用问题
This commit is contained in:
@@ -111,11 +111,13 @@ public class OrderService : BaseOrderService, IOrderService
|
||||
}
|
||||
}
|
||||
|
||||
var gainfoId = gainfo?.Id ?? 0;
|
||||
|
||||
//获取人员余额
|
||||
var data = await DbContext.Queryable<GainfoEntity>()
|
||||
.LeftJoin<DepartmentEntity>((ga, department) => ga.DepartmentNo == department.No)
|
||||
.LeftJoin<GainfoMealEntity>((ga, department, mealUser) => ga.No == mealUser.UserNo)
|
||||
.Where(ga => ga.Id == gainfo.Id)
|
||||
.Where(ga => ga.Id == gainfoId)
|
||||
.Select((ga, department, mealUser) => new OrderResultResponse
|
||||
{
|
||||
UserCode = ga.Code,
|
||||
@@ -362,6 +364,12 @@ public class OrderService : BaseOrderService, IOrderService
|
||||
Image = request.Image
|
||||
});
|
||||
}
|
||||
|
||||
await DbContext.Updateable<CanteenOrderEntity>()
|
||||
.SetColumns(x => x.OrderStatus == CanteenOrderStatusEnumType.Success)
|
||||
.SetColumns(x => x.ModifiedTime == DateTime.Now)
|
||||
.Where(x => x.Id == orderId)
|
||||
.ExecuteCommandAsync();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@@ -374,12 +382,6 @@ public class OrderService : BaseOrderService, IOrderService
|
||||
|
||||
throw;
|
||||
}
|
||||
|
||||
await DbContext.Updateable<CanteenOrderEntity>()
|
||||
.SetColumns(x => x.OrderStatus == CanteenOrderStatusEnumType.Success)
|
||||
.SetColumns(x => x.ModifiedTime == DateTime.Now)
|
||||
.Where(x => x.Id == orderId)
|
||||
.ExecuteCommandAsync();
|
||||
}
|
||||
|
||||
public async Task<Pagination<OrderAggregationResponse>> GetOrdersAggregationAsync(PageDto page)
|
||||
|
||||
Reference in New Issue
Block a user