diff --git a/aspnet-core/LINGYUN.MicroService.All.slnx b/aspnet-core/LINGYUN.MicroService.All.slnx
index 011923378..a990dac8d 100644
--- a/aspnet-core/LINGYUN.MicroService.All.slnx
+++ b/aspnet-core/LINGYUN.MicroService.All.slnx
@@ -105,6 +105,9 @@
+
+
+
@@ -433,6 +436,7 @@
+
diff --git a/aspnet-core/LINGYUN.MicroService.SingleProject.slnx b/aspnet-core/LINGYUN.MicroService.SingleProject.slnx
index 269419841..7f687aba2 100644
--- a/aspnet-core/LINGYUN.MicroService.SingleProject.slnx
+++ b/aspnet-core/LINGYUN.MicroService.SingleProject.slnx
@@ -36,6 +36,9 @@
+
+
+
@@ -96,6 +99,7 @@
+
diff --git a/aspnet-core/aspire/LINGYUN.Abp.MicroService.MessageService/LINGYUN.Abp.MicroService.MessageService.csproj b/aspnet-core/aspire/LINGYUN.Abp.MicroService.MessageService/LINGYUN.Abp.MicroService.MessageService.csproj
index c266d7bb7..d56ea12ac 100644
--- a/aspnet-core/aspire/LINGYUN.Abp.MicroService.MessageService/LINGYUN.Abp.MicroService.MessageService.csproj
+++ b/aspnet-core/aspire/LINGYUN.Abp.MicroService.MessageService/LINGYUN.Abp.MicroService.MessageService.csproj
@@ -55,6 +55,7 @@
+
diff --git a/aspnet-core/aspire/LINGYUN.Abp.MicroService.MessageService/MessageServiceModule.cs b/aspnet-core/aspire/LINGYUN.Abp.MicroService.MessageService/MessageServiceModule.cs
index 5445db5cd..4bc4d45f3 100644
--- a/aspnet-core/aspire/LINGYUN.Abp.MicroService.MessageService/MessageServiceModule.cs
+++ b/aspnet-core/aspire/LINGYUN.Abp.MicroService.MessageService/MessageServiceModule.cs
@@ -23,6 +23,7 @@ using LINGYUN.Abp.LocalizationManagement.EntityFrameworkCore;
using LINGYUN.Abp.MessageService;
using LINGYUN.Abp.MessageService.EntityFrameworkCore;
using LINGYUN.Abp.Notifications;
+using LINGYUN.Abp.Notifications.Calendar;
using LINGYUN.Abp.Notifications.Common;
using LINGYUN.Abp.Notifications.Emailing;
using LINGYUN.Abp.Notifications.EntityFrameworkCore;
@@ -102,6 +103,7 @@ namespace LINGYUN.Abp.MicroService.MessageService;
typeof(AbpNotificationsWeChatWorkModule),
typeof(AbpNotificationsExceptionHandlingModule),
typeof(AbpNotificationsTemplatingModule),
+ typeof(AbpNotificationsCalendarModule),
typeof(AbpWeChatWorkHandlersModule),
typeof(AbpWeChatOfficialHandlersModule),
typeof(AbpIdentityNotificationsModule),
diff --git a/aspnet-core/framework/calendars/LINGYUN.Abp.Calendar/LINGYUN/Abp/Calendar/WorkdayCalendarService.cs b/aspnet-core/framework/calendars/LINGYUN.Abp.Calendar/LINGYUN/Abp/Calendar/WorkdayCalendarService.cs
index e63ff3150..56f796efc 100644
--- a/aspnet-core/framework/calendars/LINGYUN.Abp.Calendar/LINGYUN/Abp/Calendar/WorkdayCalendarService.cs
+++ b/aspnet-core/framework/calendars/LINGYUN.Abp.Calendar/LINGYUN/Abp/Calendar/WorkdayCalendarService.cs
@@ -87,7 +87,7 @@ public class WorkdayCalendarService : IWorkdayCalendarService, ITransientDepende
return false;
}
if (_options.EnableWorkTimeRestriction &&
- !_options.DefaultWorkTimes.Any(timeRange => timeRange.StartTime >= time.TimeOfDay && timeRange.EndTime <= time.TimeOfDay))
+ !_options.DefaultWorkTimes.Any(timeRange => time.TimeOfDay >= timeRange.StartTime && time.TimeOfDay <= timeRange.EndTime))
{
return false;
}
@@ -109,7 +109,7 @@ public class WorkdayCalendarService : IWorkdayCalendarService, ITransientDepende
if (calendar.EnableWorkTimeRestriction &&
calendar.WorkTimes != null)
{
- return calendar.WorkTimes.Any(x => x.StartTime >= time.TimeOfDay && x.EndTime <= time.TimeOfDay);
+ return calendar.WorkTimes.Any(timeRange => time.TimeOfDay >= timeRange.StartTime && time.TimeOfDay <= timeRange.EndTime);
}
return false;
diff --git a/aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.Calendar/LINGYUN/Abp/Notifications/Calendar/WorkdayCalendarPublishInterceptor.cs b/aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.Calendar/LINGYUN/Abp/Notifications/Calendar/WorkdayCalendarPublishInterceptor.cs
index a24d997bd..f93beff5e 100644
--- a/aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.Calendar/LINGYUN/Abp/Notifications/Calendar/WorkdayCalendarPublishInterceptor.cs
+++ b/aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.Calendar/LINGYUN/Abp/Notifications/Calendar/WorkdayCalendarPublishInterceptor.cs
@@ -3,7 +3,6 @@ using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging.Abstractions;
using System;
using System.Threading.Tasks;
-using Volo.Abp.DependencyInjection;
using Volo.Abp.MultiTenancy;
using Volo.Abp.Timing;
@@ -12,7 +11,7 @@ namespace LINGYUN.Abp.Notifications.Calendar;
///
/// 工作日通知发布拦截器
///
-public class WorkdayCalendarPublishInterceptor : INotificationPublishInterceptor, ITransientDependency
+public class WorkdayCalendarPublishInterceptor : INotificationPublishInterceptor
{
private readonly IClock _clock;
private readonly ICurrentTenant _currentTenant;
diff --git a/aspnet-core/services/LY.MicroService.Applications.Single/LY.MicroService.Applications.Single.csproj b/aspnet-core/services/LY.MicroService.Applications.Single/LY.MicroService.Applications.Single.csproj
index c2023f0f5..5537e2c55 100644
--- a/aspnet-core/services/LY.MicroService.Applications.Single/LY.MicroService.Applications.Single.csproj
+++ b/aspnet-core/services/LY.MicroService.Applications.Single/LY.MicroService.Applications.Single.csproj
@@ -211,6 +211,7 @@
+
diff --git a/aspnet-core/services/LY.MicroService.Applications.Single/MicroServiceApplicationsSingleModule.cs b/aspnet-core/services/LY.MicroService.Applications.Single/MicroServiceApplicationsSingleModule.cs
index e8693c8c6..287123617 100644
--- a/aspnet-core/services/LY.MicroService.Applications.Single/MicroServiceApplicationsSingleModule.cs
+++ b/aspnet-core/services/LY.MicroService.Applications.Single/MicroServiceApplicationsSingleModule.cs
@@ -1,4 +1,5 @@
using LINGYUN.Abp.Exporter.MiniSoftware;
+using LINGYUN.Abp.Notifications.Calendar;
namespace LY.MicroService.Applications.Single;
@@ -316,6 +317,8 @@ namespace LY.MicroService.Applications.Single;
typeof(AbpNotificationsWeChatMiniProgramModule),
// 通知模块 企业微信
typeof(AbpNotificationsWeChatWorkModule),
+ // 通知模块 工作日检查拦截器
+ typeof(AbpNotificationsCalendarModule),
// 多租户模块 版本
typeof(AbpMultiTenancyEditionsModule),
diff --git a/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/LY.MicroService.RealtimeMessage.HttpApi.Host.csproj b/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/LY.MicroService.RealtimeMessage.HttpApi.Host.csproj
index 0660c8477..f947c5d5a 100644
--- a/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/LY.MicroService.RealtimeMessage.HttpApi.Host.csproj
+++ b/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/LY.MicroService.RealtimeMessage.HttpApi.Host.csproj
@@ -74,6 +74,7 @@
+
diff --git a/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/RealtimeMessageHttpApiHostModule.cs b/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/RealtimeMessageHttpApiHostModule.cs
index ca465dfb5..e98996175 100644
--- a/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/RealtimeMessageHttpApiHostModule.cs
+++ b/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/RealtimeMessageHttpApiHostModule.cs
@@ -23,6 +23,7 @@ using LINGYUN.Abp.LocalizationManagement.EntityFrameworkCore;
using LINGYUN.Abp.MessageService;
using LINGYUN.Abp.MessageService.EntityFrameworkCore;
using LINGYUN.Abp.Notifications;
+using LINGYUN.Abp.Notifications.Calendar;
using LINGYUN.Abp.Notifications.Common;
using LINGYUN.Abp.Notifications.Emailing;
using LINGYUN.Abp.Notifications.EntityFrameworkCore;
@@ -107,6 +108,7 @@ namespace LY.MicroService.RealtimeMessage;
typeof(AbpNotificationsWeChatWorkModule),
typeof(AbpNotificationsExceptionHandlingModule),
typeof(AbpNotificationsTemplatingModule),
+ typeof(AbpNotificationsCalendarModule),
typeof(AbpWeChatWorkHandlersModule),
typeof(AbpWeChatOfficialHandlersModule),
typeof(AbpIdentityNotificationsModule),