fix 恢复now
This commit is contained in:
@@ -536,14 +536,14 @@ public class OrderService : IOrderService
|
||||
/// <param name="idNo"></param>
|
||||
private async Task EMealVoucherConsumeAsync(ConsumeRequest request, GainfoEntity gainfo, string originData, string no, string idNo)
|
||||
{
|
||||
var nowDate = DateTime.Now.Date;
|
||||
var now = DateTime.Now;
|
||||
|
||||
var current = await _dbContext.Queryable<EMealVoucherDetailEntity>()
|
||||
.Where(x => x.No == no && x.IdNo == idNo)
|
||||
.Select(x => new { x.Start, x.End })
|
||||
.SingleAsync();
|
||||
|
||||
(nowDate >= current.Start && nowDate <= current.End).ThrowIfFalse("餐券已过期");
|
||||
(now >= current.Start && now <= current.End).ThrowIfFalse("餐券已过期");
|
||||
|
||||
|
||||
var eMealVoucher = await _dbContext.Queryable<EMealVoucherEntity>().Where(x => x.No == no).SingleAsync();
|
||||
|
||||
Reference in New Issue
Block a user