From ce1292c9cf37195b6abd2699dfc5d6cb3e143c9b Mon Sep 17 00:00:00 2001
From: wanshenmean <cathay_xy@163.com>
Date: 星期日, 12 四月 2026 23:38:19 +0800
Subject: [PATCH] feat(MES): 添加MES接口相关实体和DTO JS扩展文件至JSX格式并更新配置
---
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