From a7ceaaa38a4394b82501ca60230e97d25a6871e3 Mon Sep 17 00:00:00 2001
From: wangxinhui <wangxinhui@hnkhzn.com>
Date: 星期六, 18 一月 2025 17:30:33 +0800
Subject: [PATCH] 1

---
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Core/Extensions/AutofacModuleRegister.cs |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/Extensions/AutofacModuleRegister.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/Extensions/AutofacModuleRegister.cs"
index efdb638..c98e78c 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/Extensions/AutofacModuleRegister.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/Extensions/AutofacModuleRegister.cs"
@@ -1,5 +1,6 @@
 锘縰sing Autofac;
 using Autofac.Extras.DynamicProxy;
+using HslCommunication.WebSocket;
 using Microsoft.Extensions.DependencyModel;
 using OfficeOpenXml.FormulaParsing.Excel.Functions.Text;
 using System;
@@ -13,6 +14,7 @@
 using WIDESEA_Core.BaseRepository;
 using WIDESEA_Core.BaseServices;
 using WIDESEA_Core.Helper;
+using WIDESEA_Core.LogHelper;
 
 namespace WIDESEA_Core.Extensions
 {
@@ -25,8 +27,11 @@
             var cacheType = new List<Type>();
 
             builder.RegisterType<LogAOP>();
-            cacheType.Add(typeof(LogAOP));
-
+            if (AppSettings.Get("LogAopEnable").ObjToBool())
+            {
+                cacheType.Add(typeof(LogAOP));
+            }
+            
             builder.RegisterGeneric(typeof(RepositoryBase<>)).As(typeof(IRepository<>)).InstancePerDependency();//娉ㄥ唽浠撳偍
             builder.RegisterGeneric(typeof(ServiceBase<,>)).As(typeof(IService<>)).InstancePerDependency();//娉ㄥ唽鏈嶅姟
 
@@ -68,6 +73,8 @@
                .AsImplementedInterfaces()
                .InstancePerLifetimeScope()
                .PropertiesAutowired();
+
+            builder.RegisterType<RequestLogModel>().InstancePerLifetimeScope();
         }
     }
 }

--
Gitblit v1.9.3