fix 订餐返回当前信息,增加数量入参和响应
This commit is contained in:
@@ -79,7 +79,10 @@ public class DishesMenusController : ControllerBase
|
||||
/// <param name="categoryCodes"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("dishes-selections")]
|
||||
public async Task<List<DishesDetailResponse>> GetDishesUnderCurrentMenuAsync(Guid businessPlaceCode, DateTime date, ShiftEnumType? shiftType, [FromQuery] List<Guid> categoryCodes)
|
||||
public async Task<List<DishesDetailResponse>> GetDishesUnderCurrentMenuAsync(Guid businessPlaceCode,
|
||||
DateTime date,
|
||||
ShiftEnumType? shiftType,
|
||||
[FromQuery] List<Guid> categoryCodes)
|
||||
{
|
||||
return await _dishesMenuService.GetDishesUnderCurrentMenuAsync(businessPlaceCode, date, shiftType, categoryCodes);
|
||||
}
|
||||
|
||||
@@ -42,6 +42,11 @@ public class DishesDetailResponse
|
||||
/// </summary>
|
||||
public int Number { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 剩余数量
|
||||
/// </summary>
|
||||
public int Number { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 单位
|
||||
/// </summary>
|
||||
|
||||
@@ -115,11 +115,11 @@ public class BookingOrderService : BaseOrderService, IBookingOrderService
|
||||
Version = 0,
|
||||
});
|
||||
|
||||
(mealInfo == null).ThrowIfTrue("余额不足,无法消费");
|
||||
}
|
||||
//金额+-
|
||||
mealInfo.Balance += order.Amount;
|
||||
(mealInfo.Balance < 0).ThrowIfTrue("余额不足,无法消费");
|
||||
(mealInfo == null).ThrowIfTrue("余额不足,无法消费");
|
||||
}
|
||||
//金额+-
|
||||
mealInfo.Balance += order.Amount;
|
||||
(mealInfo.Balance < 0).ThrowIfTrue("余额不足,无法消费");
|
||||
|
||||
var effectMeal = await DbContext.Updateable<GainfoMealEntity>()
|
||||
.SetColumns(x => x.Balance == mealInfo.Balance)
|
||||
|
||||
Reference in New Issue
Block a user