jianghaiqing 1 year ago
commit 626bf6ba50

@ -100,11 +100,15 @@ public class LogJobWorker : ISpareTimeWorker, IDynamicApiController, ITransient
Log.Information($"准备清理天{daysAgo}之前的日志LogOp");
// 生成查询表达式
Expression<Func<SysLogOp, bool>> expression = ex => ex.OpTime < DateTime.Now.AddDays(-daysAgo);
//// 生成查询表达式
//Expression<Func<SysLogOp, bool>> expression = ex => ex.OpTime < DateTime.Now.AddDays(-daysAgo);
// 执行删除
DoDeleteWork(expression);
//// 执行删除
//DoDeleteWork(expression);
var repLogOp = App.GetService<SqlSugarRepository<SysLogOp>>();
repLogOp.Delete(x => x.OpTime < DateTime.Today.AddDays(-daysAgo));
}
/// <summary>

Loading…
Cancel
Save