feat(billing): 新增逾期账单自动标记定时任务
1. 新增Hangfire定时任务BillingOverdueProcessJob 2. 修复逾期账单查询条件过宽问题 3. 默认每10分钟执行一次逾期检查
This commit is contained in:
@@ -32,6 +32,11 @@ public static class SchedulerServiceCollectionExtensions
|
||||
.ValidateDataAnnotations()
|
||||
.ValidateOnStart();
|
||||
|
||||
services.AddOptions<BillingAutomationOptions>()
|
||||
.Bind(configuration.GetSection("Scheduler:BillingAutomation"))
|
||||
.ValidateDataAnnotations()
|
||||
.ValidateOnStart();
|
||||
|
||||
services.AddHangfire((serviceProvider, config) =>
|
||||
{
|
||||
var options = serviceProvider.GetRequiredService<IOptionsMonitor<SchedulerOptions>>().CurrentValue;
|
||||
@@ -59,6 +64,7 @@ public static class SchedulerServiceCollectionExtensions
|
||||
services.AddScoped<SubscriptionRenewalReminderJob>();
|
||||
services.AddScoped<SubscriptionExpiryCheckJob>();
|
||||
services.AddScoped<SubscriptionAutoRenewalJob>();
|
||||
services.AddScoped<BillingOverdueProcessJob>();
|
||||
|
||||
return services;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user