接管用户 API 支持电话/工号/微信号/微信二维码,新增客户专属顾问查询,并移除仓库客服电话与微信相关字段。 Co-authored-by: Cursor <cursoragent@cursor.com>
43 lines
1.6 KiB
C#
43 lines
1.6 KiB
C#
using AutoMapper;
|
|
using Oms.Application.Dtos.Customers;
|
|
using Oms.Application.Dtos.Operations;
|
|
using Oms.Application.Dtos.Orders;
|
|
using Oms.Application.Dtos.Recharge;
|
|
using Oms.Application.Dtos.System;
|
|
using Oms.Application.Shared;
|
|
using Oms.Domain.ChannelsAggregate.Entities;
|
|
using Oms.Domain.CustomersAggregate.Entities;
|
|
using Oms.Domain.OperationsAggregate.Entities;
|
|
using Oms.Domain.OrdersAggregate.Entities;
|
|
using Oms.Domain.RechargeAggregate.Entities;
|
|
using Oms.Domain.SystemAggregate.Entities;
|
|
|
|
namespace Oms.Application.Profiles;
|
|
|
|
/// <summary>
|
|
/// OMS 应用层 AutoMapper 映射配置。
|
|
/// </summary>
|
|
public class OmsApplicationAutoMapperProfile : Profile
|
|
{
|
|
/// <summary>
|
|
/// 注册实体与 DTO 之间的映射关系。
|
|
/// </summary>
|
|
public OmsApplicationAutoMapperProfile()
|
|
{
|
|
CreateMap<Customer, CustomerPaginatedOutput>();
|
|
CreateMap<Customer, CustomerOutput>();
|
|
CreateMap<RechargeRecord, RechargeRecordOutput>();
|
|
CreateMap<RechargeRecord, RechargeRecordPaginatedOutput>();
|
|
CreateMap<WarehouseAddress, WarehousePaginatedOutput>();
|
|
CreateMap<WarehouseAddress, WarehouseOutput>();
|
|
CreateMap<InboundRecord, InboundRecordOutput>();
|
|
CreateMap<OutboundRecord, OutboundRecordOutput>();
|
|
CreateMap<LabelPrintRecord, LabelPrintRecordOutput>();
|
|
CreateMap<LabelTemplate, LabelTemplateDropdownOutput>()
|
|
.ForMember(dest => dest.TemplateJson,
|
|
opt => opt.MapFrom(src => OmsDocHelper.DeserializeJsonObject(src.TemplateJson)));
|
|
CreateMap<Order, OrderPaginatedOutput>();
|
|
CreateMap<Order, OrderOutput>();
|
|
}
|
|
}
|