fix 成本日期判断

This commit is contained in:
2024-01-16 14:37:45 +08:00
parent c2b5e12ffe
commit ae84b48795

View File

@@ -125,12 +125,10 @@ public class OrderService : IOrderService
}
else
{
if (shiftTimePeriod.IsCrossDay())
costDate = DateTime.Now.AddDays(-1);
var beginOfDay = DateTime.Today;
if (switchTime.HasValue)
{
var beginOfDay = DateTime.Today;
var setTime = beginOfDay.Add(switchTime.Value.ToTimeSpan());
if (DateTime.Now < setTime)
costDate = DateTime.Now.AddDays(-1);