From c49db6a20308e0f68a22d1fa34e6928c9ee4a04a Mon Sep 17 00:00:00 2001 From: colin Date: Tue, 15 Jul 2025 17:27:42 +0800 Subject: [PATCH] fix(notifications): fixed expired expired notices jobs --- .../Abp/Notifications/Jobs/NotificationCleanupJob.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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); } }