fix 时间判断
This commit is contained in:
@@ -667,10 +667,10 @@ public class OrderService : BaseOrderService, IOrderService
|
||||
|
||||
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).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