refactor: 引入管理端 DbContext 禁用租户过滤
This commit is contained in:
@@ -68,7 +68,7 @@ public sealed class AutoRenewalService : BackgroundService
|
||||
_logger.LogInformation("开始处理自动续费");
|
||||
|
||||
using var scope = _serviceProvider.CreateScope();
|
||||
var dbContext = scope.ServiceProvider.GetRequiredService<TakeoutAppDbContext>();
|
||||
var dbContext = scope.ServiceProvider.GetRequiredService<TakeoutAdminDbContext>();
|
||||
var idGenerator = scope.ServiceProvider.GetRequiredService<IIdGenerator>();
|
||||
|
||||
var now = DateTime.UtcNow;
|
||||
|
||||
@@ -68,7 +68,7 @@ public sealed class RenewalReminderService : BackgroundService
|
||||
_logger.LogInformation("开始发送续费提醒");
|
||||
|
||||
using var scope = _serviceProvider.CreateScope();
|
||||
var dbContext = scope.ServiceProvider.GetRequiredService<TakeoutAppDbContext>();
|
||||
var dbContext = scope.ServiceProvider.GetRequiredService<TakeoutAdminDbContext>();
|
||||
var idGenerator = scope.ServiceProvider.GetRequiredService<IIdGenerator>();
|
||||
|
||||
var now = DateTime.UtcNow;
|
||||
|
||||
@@ -66,7 +66,7 @@ public sealed class SubscriptionExpiryCheckService : BackgroundService
|
||||
_logger.LogInformation("开始执行订阅到期检查");
|
||||
|
||||
using var scope = _serviceProvider.CreateScope();
|
||||
var dbContext = scope.ServiceProvider.GetRequiredService<TakeoutAppDbContext>();
|
||||
var dbContext = scope.ServiceProvider.GetRequiredService<TakeoutAdminDbContext>();
|
||||
|
||||
var now = DateTime.UtcNow;
|
||||
var gracePeriodDays = _options.GracePeriodDays;
|
||||
|
||||
Reference in New Issue
Block a user