fix 餐补查询及日志删除

This commit is contained in:
cheche
2024-03-20 15:27:37 +08:00
parent 1ce60bedc2
commit a90d4e66a7
14 changed files with 334 additions and 10 deletions

View File

@@ -21,11 +21,11 @@ namespace Dlhis.ScheduledTask.CommonJobs;
{
DateTime now = DateTime.Now;
DateTime todayStart = now.Date;
DateTime threeDaysAgoStart = todayStart.AddDays(-3);
DateTime threeDaysAgoStart = todayStart.AddDays(-7);
var logs = await _dbContext.ChangeDb("log")
.Queryable<ApiLogEntity>()
.Where(x => x._ts <= threeDaysAgoStart)
.Where(x => x._ts >= threeDaysAgoStart && x._ts <= now)
.Select(x => x.Id)
.ToListAsync();