refactor 代码优化

This commit is contained in:
2024-08-14 15:43:37 +08:00
parent b5ed24c46a
commit e93102b4cb

View File

@@ -676,6 +676,7 @@ public class OrderService : BaseOrderService, IOrderService
Msg = message
};
}
async Task<bool> ToCheckAbleOfflineConsumeAsync(string thirdNo)
{
var order = await DbContext.Queryable<CanteenOrderEntity>()
@@ -715,7 +716,6 @@ public class OrderService : BaseOrderService, IOrderService
(nowDate >= current.Start && nowDate <= current.End).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();