This commit is contained in:
2025-07-12 18:52:08 +08:00
parent 52f4d6e3c4
commit 995a8f115a
9 changed files with 80 additions and 83 deletions

View File

@@ -30,15 +30,15 @@ namespace MyCode.Project.ScheduleTask
IUnityContainer container = UnityHelper.GetUnityContainer();
container.RegisterType<MyCodeSqlSugarClient>(new PerThreadLifetimeManager());
container.RegisterType<WMSSqlSugarClient>(new PerThreadLifetimeManager());
//注册缓存对象
container.RegisterType<IMyCodeCacheService, RedisCache>();
//注册缓存对象
container.RegisterType<IMyCodeCacheService, RedisCache>(new InjectionConstructor(SystemConfig.RedisAddress, SystemConfig.CachePrefix));
//提前初始化一次
//new RedisCache(SystemConfig.RedisAddress, SystemConfig.CachePrefix);
//new DingDingHelper(SystemConfig.DingDingApiUrl,SystemConfig.Env);
//提前初始化一次
new RedisCache(SystemConfig.RedisAddress, SystemConfig.CachePrefix);
new DingDingHelper(SystemConfig.DingDingApiUrl,SystemConfig.Env);
container.AddNewExtension<QuartzUnityExtension>();
container.AddNewExtension<QuartzUnityExtension>();
ConfigFile = _ConfigFile;
List<jobinfo> list = new List<jobinfo>();