fix 移除电子餐券二维码时效

This commit is contained in:
2024-09-20 19:45:24 +08:00
parent 33e2db3398
commit 17e494f5c8

View File

@@ -674,8 +674,9 @@ public class OrderService : BaseOrderService, IOrderService
.Where(x => x.No == no && x.IdNo == idNo).SingleAsync(); .Where(x => x.No == no && x.IdNo == idNo).SingleAsync();
(nowDate >= current.Start && nowDate <= current.End).ThrowIfFalse("餐券已过期"); (nowDate >= current.Start && nowDate <= current.End).ThrowIfFalse("餐券已过期");
var time = DateTimeOffset.FromUnixTimeMilliseconds(Convert.ToInt64(ts.Reverse().Join(string.Empty))).ToLocalTime().DateTime; //todo 临时注释
(time.AddMinutes(60) >= DateTime.Now).ThrowIfFalse("餐券二维码已过期"); // var time = DateTimeOffset.FromUnixTimeMilliseconds(Convert.ToInt64(ts.Reverse().Join(string.Empty))).ToLocalTime().DateTime;
// (time.AddMinutes(60) >= DateTime.Now).ThrowIfFalse("餐券二维码已过期");
var eMealVoucher = await DbContext.Queryable<EMealVoucherEntity>().Where(x => x.No == no).SingleAsync(); var eMealVoucher = await DbContext.Queryable<EMealVoucherEntity>().Where(x => x.No == no).SingleAsync();