fix 区分提醒
This commit is contained in:
@@ -107,9 +107,7 @@ public class OrderService : BaseOrderService, IOrderService
|
||||
|
||||
try
|
||||
{
|
||||
(await DbContext.Queryable<GainfoMealEntity>().Where(x => x.UserNo == gainfo.No).AnyAsync())
|
||||
.ThrowIfFalse("余额不足,无法消费");
|
||||
|
||||
(await DbContext.Queryable<GainfoMealEntity>().Where(x => x.UserCode == gainfo.Code).AnyAsync()).ThrowIfFalse("就餐余额不足");
|
||||
await ConsumeAsync(request.Adapt<ConsumeRequest>(), gainfo);
|
||||
}
|
||||
catch (Exception ex)
|
||||
@@ -618,7 +616,6 @@ public class OrderService : BaseOrderService, IOrderService
|
||||
var gainfoMeal = await DbContext.Queryable<GainfoMealEntity>().Where(x => x.UserNo == order.UserNo).SingleAsync();
|
||||
//金额+-
|
||||
gainfoMeal.Balance += order.Amount;
|
||||
|
||||
(gainfoMeal.Balance < 0).ThrowIfTrue("余额不足,无法消费");
|
||||
|
||||
await DbContext.Updateable<GainfoMealEntity>()
|
||||
|
||||
Reference in New Issue
Block a user