From f197ac114061e075e72b9fe15d350c4485c9b260 Mon Sep 17 00:00:00 2001
From: xiazhengtongxue <133085197+xiazhengtongxue@users.noreply.github.com>
Date: 星期一, 30 三月 2026 16:58:08 +0800
Subject: [PATCH] feat(AGV): 新增极卷库AGV接口

---
 Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Filter/AutoMapperSetup.cs |   18 ++++++++++++------
 1 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Filter/AutoMapperSetup.cs b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Filter/AutoMapperSetup.cs
index d1ac9d1..c6cac5f 100644
--- a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Filter/AutoMapperSetup.cs
+++ b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Filter/AutoMapperSetup.cs
@@ -1,16 +1,22 @@
-锘縩amespace WIDESEAWCS_WCSServer.Filter
+锘縰sing Mapster;
+using MapsterMapper;
+
+namespace WIDESEAWCS_WCSServer.Filter
 {
     /// <summary>
-    /// Automapper 鍚姩鏈嶅姟
+    /// Mapster 鍚姩鏈嶅姟
     /// </summary>
-    public static class AutoMapperSetup
+    public static class MapsterSetup
     {
-        public static void AddAutoMapperSetup(this IServiceCollection services)
+        public static void AddMapsterSetup(this IServiceCollection services)
         {
             if (services == null) throw new ArgumentNullException(nameof(services));
 
-            services.AddAutoMapper(typeof(AutoMapperConfig));
-            AutoMapperConfig.RegisterMappings();
+            TypeAdapterConfig typeAdapterConfig = new TypeAdapterConfig();
+            MapsterConfig.RegisterMappings(typeAdapterConfig);
+
+            services.AddSingleton(typeAdapterConfig);
+            services.AddScoped<IMapper, ServiceMapper>();
         }
     }
 }

--
Gitblit v1.9.3