diff --git a/aspnet-core/modules/task-management/LINGYUN.Abp.Notifications.Jobs/LINGYUN/Abp/Notifications/Jobs/NotificationCleanupJob.cs b/aspnet-core/modules/task-management/LINGYUN.Abp.Notifications.Jobs/LINGYUN/Abp/Notifications/Jobs/NotificationCleanupJob.cs index 917e63298..59c3270cc 100644 --- a/aspnet-core/modules/task-management/LINGYUN.Abp.Notifications.Jobs/LINGYUN/Abp/Notifications/Jobs/NotificationCleanupJob.cs +++ b/aspnet-core/modules/task-management/LINGYUN.Abp.Notifications.Jobs/LINGYUN/Abp/Notifications/Jobs/NotificationCleanupJob.cs @@ -1,6 +1,8 @@ using LINGYUN.Abp.BackgroundTasks; using System.Collections.Generic; using System.Threading.Tasks; +using Volo.Abp.MultiTenancy; +using Volo.Abp.Timing; namespace LINGYUN.Abp.Notifications.Jobs; @@ -24,8 +26,10 @@ public class NotificationCleanupJob : IJobRunnable public async virtual Task ExecuteAsync(JobRunnableContext context) { var count = context.GetJobData(PropertyBatchCount); + var clock = context.GetRequiredService(); var store = context.GetRequiredService(); + var currentTenant = context.GetRequiredService(); - await store.DeleteNotificationAsync(count); + await store.DeleteExpritionNotificationAsync(currentTenant.Id, count, clock.Now); } }