From 9b77acb859f0866f3a854d2a2842072b2fe9cca8 Mon Sep 17 00:00:00 2001
From: wanshenmean <cathay_xy@163.com>
Date: 星期二, 31 三月 2026 16:43:27 +0800
Subject: [PATCH] feat(wms): 完善库存三维看板与库存/货位变更追踪
---
Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Filter/AutoMapperSetup.cs | 15 ++++++++++-----
1 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Filter/AutoMapperSetup.cs b/Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Filter/AutoMapperSetup.cs
index 0e51421..c15c833 100644
--- a/Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Filter/AutoMapperSetup.cs
+++ b/Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Filter/AutoMapperSetup.cs
@@ -1,7 +1,10 @@
-锘縩amespace WIDESEA_WMSServer.Filter
+using Mapster;
+using MapsterMapper;
+
+namespace WIDESEA_WMSServer.Filter
{
/// <summary>
- /// Automapper 鍚姩鏈嶅姟
+ /// Mapster 鍚姩鏈嶅姟
/// </summary>
public static class AutoMapperSetup
{
@@ -9,8 +12,10 @@
{
if (services == null) throw new ArgumentNullException(nameof(services));
- services.AddAutoMapper(typeof(AutoMapperConfig));
- AutoMapperConfig.RegisterMappings();
+ var config = TypeAdapterConfig.GlobalSettings;
+ AutoMapperConfig.RegisterMappings(config);
+ services.AddSingleton(config);
+ services.AddScoped<IMapper, ServiceMapper>();
}
}
-}
+}
\ No newline at end of file
--
Gitblit v1.9.3