From be08510a847158e54c133301a9d14d2b8a034f37 Mon Sep 17 00:00:00 2001 From: chfei Date: Wed, 30 Sep 2026 15:46:20 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=AE=9A=E6=97=B6=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=EF=BC=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- KJD_WebService/Global.asax.cs | 4 +- KJD_WebService/Web.config | 4 ++ .../DependencyInjection/ContainerConfig.cs | 61 +++++++++++++++++-- Store.Framework/Jobs/ContainerJobActivator.cs | 15 +++++ Store.Framework/Jobs/IScheduledJobs.cs | 12 ++++ Store.Framework/Jobs/JobAttribute.cs | 20 ++++++ Store.Framework/Startup.cs | 2 +- Store.Framework/Store.Framework.csproj | 2 + Store.SyncLogistics/Jobs/BalanceCheckJob.cs | 31 ++++++++++ Store.SyncLogistics/Startup.cs | 28 +++++++++ 10 files changed, 171 insertions(+), 8 deletions(-) create mode 100644 Store.Framework/Jobs/ContainerJobActivator.cs create mode 100644 Store.Framework/Jobs/IScheduledJobs.cs create mode 100644 Store.Framework/Jobs/JobAttribute.cs create mode 100644 Store.SyncLogistics/Jobs/BalanceCheckJob.cs create mode 100644 Store.SyncLogistics/Startup.cs diff --git a/KJD_WebService/Global.asax.cs b/KJD_WebService/Global.asax.cs index 916ad52..429b543 100644 --- a/KJD_WebService/Global.asax.cs +++ b/KJD_WebService/Global.asax.cs @@ -33,8 +33,10 @@ namespace KJD_Web // 让 Web API 用 Autofac 解析 Controller GlobalConfiguration.Configuration.DependencyResolver = new AutofacWebApiDependencyResolver(container); - GlobalConfiguration.Configure(WebApiConfig.Register); + ContainerConfig.BuildHangfire(GlobalConfiguration.Configuration.DependencyResolver); + + GlobalConfiguration.Configure(WebApiConfig.Register); } diff --git a/KJD_WebService/Web.config b/KJD_WebService/Web.config index cc05afc..d8c0792 100644 --- a/KJD_WebService/Web.config +++ b/KJD_WebService/Web.config @@ -26,6 +26,10 @@ + + + +