fix 增加日志输出
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using Dlhis.Entity.Basic.Entity;
|
||||
using Dlhis.ScheduledTask.Attributes;
|
||||
using Kurisu.AspNetCore.Utils.Extensions;
|
||||
using SqlSugar;
|
||||
|
||||
namespace Dlhis.ScheduledTask.Jobs;
|
||||
@@ -13,7 +14,7 @@ public class RemoveFacePictureAfterResignedJob : BaseJob
|
||||
|
||||
protected override async Task RunAsync(IServiceProvider serviceProvider)
|
||||
{
|
||||
var start = new DateTime(2024, 1, 1);
|
||||
var start = DateTime.Now.AddMonths(-1).Date;
|
||||
var now = DateTime.Now.AddDays(-7).Date;
|
||||
|
||||
var leaveUserCodes = await DbContext.Queryable<GainfoLeaveEntity>()
|
||||
@@ -33,6 +34,8 @@ public class RemoveFacePictureAfterResignedJob : BaseJob
|
||||
await faceDbContext.Deleteable<GainfoFaceEntity>()
|
||||
.Where(x => leaveUserCode.Contains(x.UserCode))
|
||||
.ExecuteCommandAsync();
|
||||
|
||||
Logger.LogInformation("移除人脸图片,工号列表:{codes}", leaveUserCode.Join(","));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user