From 0b1f4352bc32bb41edfb66f9afbc5fc7bc329f24 Mon Sep 17 00:00:00 2001
From: MSuMshk <2039814060@qq.com>
Date: Fri, 12 Dec 2025 11:52:19 +0800
Subject: [PATCH] =?UTF-8?q?docs:=20=E6=8F=90=E4=BA=A4=E5=BD=93=E5=89=8D?=
=?UTF-8?q?=E6=B3=A8=E9=87=8A=E6=9B=B4=E6=96=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
MISSING_XML_DOCS.md | 26 ------------
.../App/Merchants/Dto/MerchantAuditLogDto.cs | 21 ++++++++++
.../App/Merchants/Dto/MerchantContractDto.cs | 30 ++++++++++++++
.../App/Merchants/Dto/MerchantDocumentDto.cs | 30 ++++++++++++++
.../AddMerchantDocumentCommandHandler.cs | 6 +++
.../CreateMerchantCategoryCommandHandler.cs | 6 +++
.../CreateMerchantContractCommandHandler.cs | 6 +++
.../DeleteMerchantCategoryCommandHandler.cs | 6 +++
.../GetMerchantAuditLogsQueryHandler.cs | 6 +++
.../GetMerchantCategoriesQueryHandler.cs | 6 +++
.../GetMerchantContractsQueryHandler.cs | 6 +++
.../Handlers/GetMerchantDetailQueryHandler.cs | 6 +++
.../GetMerchantDocumentsQueryHandler.cs | 6 +++
.../ListMerchantCategoriesQueryHandler.cs | 6 +++
...ReorderMerchantCategoriesCommandHandler.cs | 6 +++
.../Handlers/ReviewMerchantCommandHandler.cs | 6 +++
.../ReviewMerchantDocumentCommandHandler.cs | 6 +++
...ateMerchantContractStatusCommandHandler.cs | 6 +++
.../App/Merchants/MerchantMapping.cs | 40 +++++++++++++++++++
19 files changed, 205 insertions(+), 26 deletions(-)
delete mode 100644 MISSING_XML_DOCS.md
diff --git a/MISSING_XML_DOCS.md b/MISSING_XML_DOCS.md
deleted file mode 100644
index b025724..0000000
--- a/MISSING_XML_DOCS.md
+++ /dev/null
@@ -1,26 +0,0 @@
-# 缺失 XML 文档注释清单(自动扫描)
-
-- 统计时间:执行脚本时基于仓库当前状态。
-- 范围:`src` 下 898 个 `.cs` 文件。
-- 发现未紧邻 `///` 文档注释的文件:93 个。
-- 分层分布:Application 64,Infrastructure 19,Core 6,Modules 4。
-
-## 详细清单(路径:行号)
-- src/Application/TakeoutSaaS.Application/App/Merchants/Dto/MerchantAuditLogDto.cs:13
-- src/Application/TakeoutSaaS.Application/App/Merchants/Dto/MerchantContractDto.cs:13
-- src/Application/TakeoutSaaS.Application/App/Merchants/Dto/MerchantDocumentDto.cs:13
-- src/Application/TakeoutSaaS.Application/App/Merchants/Handlers/AddMerchantDocumentCommandHandler.cs:25
-- src/Application/TakeoutSaaS.Application/App/Merchants/Handlers/CreateMerchantCategoryCommandHandler.cs:20
-- src/Application/TakeoutSaaS.Application/App/Merchants/Handlers/CreateMerchantContractCommandHandler.cs:25
-- src/Application/TakeoutSaaS.Application/App/Merchants/Handlers/DeleteMerchantCategoryCommandHandler.cs:16
-- src/Application/TakeoutSaaS.Application/App/Merchants/Handlers/GetMerchantAuditLogsQueryHandler.cs:18
-- src/Application/TakeoutSaaS.Application/App/Merchants/Handlers/GetMerchantCategoriesQueryHandler.cs:16
-- src/Application/TakeoutSaaS.Application/App/Merchants/Handlers/GetMerchantContractsQueryHandler.cs:19
-- src/Application/TakeoutSaaS.Application/App/Merchants/Handlers/GetMerchantDetailQueryHandler.cs:19
-- src/Application/TakeoutSaaS.Application/App/Merchants/Handlers/GetMerchantDocumentsQueryHandler.cs:19
-- src/Application/TakeoutSaaS.Application/App/Merchants/Handlers/ListMerchantCategoriesQueryHandler.cs:17
-- src/Application/TakeoutSaaS.Application/App/Merchants/Handlers/ReorderMerchantCategoriesCommandHandler.cs:18
-- src/Application/TakeoutSaaS.Application/App/Merchants/Handlers/ReviewMerchantCommandHandler.cs:23
-- src/Application/TakeoutSaaS.Application/App/Merchants/Handlers/ReviewMerchantDocumentCommandHandler.cs:23
-- src/Application/TakeoutSaaS.Application/App/Merchants/Handlers/UpdateMerchantContractStatusCommandHandler.cs:23
-- src/Application/TakeoutSaaS.Application/App/Merchants/MerchantMapping.cs:11
diff --git a/src/Application/TakeoutSaaS.Application/App/Merchants/Dto/MerchantAuditLogDto.cs b/src/Application/TakeoutSaaS.Application/App/Merchants/Dto/MerchantAuditLogDto.cs
index 2c42c35..8954353 100644
--- a/src/Application/TakeoutSaaS.Application/App/Merchants/Dto/MerchantAuditLogDto.cs
+++ b/src/Application/TakeoutSaaS.Application/App/Merchants/Dto/MerchantAuditLogDto.cs
@@ -9,19 +9,40 @@ namespace TakeoutSaaS.Application.App.Merchants.Dto;
///
public sealed class MerchantAuditLogDto
{
+ ///
+ /// 日志 ID。
+ ///
[JsonConverter(typeof(SnowflakeIdJsonConverter))]
public long Id { get; init; }
+ ///
+ /// 商户 ID。
+ ///
[JsonConverter(typeof(SnowflakeIdJsonConverter))]
public long MerchantId { get; init; }
+ ///
+ /// 操作类型。
+ ///
public MerchantAuditAction Action { get; init; }
+ ///
+ /// 标题。
+ ///
public string Title { get; init; } = string.Empty;
+ ///
+ /// 描述。
+ ///
public string? Description { get; init; }
+ ///
+ /// 操作人。
+ ///
public string? OperatorName { get; init; }
+ ///
+ /// 创建时间。
+ ///
public DateTime CreatedAt { get; init; }
}
diff --git a/src/Application/TakeoutSaaS.Application/App/Merchants/Dto/MerchantContractDto.cs b/src/Application/TakeoutSaaS.Application/App/Merchants/Dto/MerchantContractDto.cs
index 3c12bb3..7a26bc5 100644
--- a/src/Application/TakeoutSaaS.Application/App/Merchants/Dto/MerchantContractDto.cs
+++ b/src/Application/TakeoutSaaS.Application/App/Merchants/Dto/MerchantContractDto.cs
@@ -9,25 +9,55 @@ namespace TakeoutSaaS.Application.App.Merchants.Dto;
///
public sealed class MerchantContractDto
{
+ ///
+ /// 合同 ID。
+ ///
[JsonConverter(typeof(SnowflakeIdJsonConverter))]
public long Id { get; init; }
+ ///
+ /// 商户 ID。
+ ///
[JsonConverter(typeof(SnowflakeIdJsonConverter))]
public long MerchantId { get; init; }
+ ///
+ /// 合同编号。
+ ///
public string ContractNumber { get; init; } = string.Empty;
+ ///
+ /// 合同状态。
+ ///
public ContractStatus Status { get; init; }
+ ///
+ /// 合同开始日期。
+ ///
public DateTime StartDate { get; init; }
+ ///
+ /// 合同结束日期。
+ ///
public DateTime EndDate { get; init; }
+ ///
+ /// 合同文件地址。
+ ///
public string FileUrl { get; init; } = string.Empty;
+ ///
+ /// 签署时间。
+ ///
public DateTime? SignedAt { get; init; }
+ ///
+ /// 解约时间。
+ ///
public DateTime? TerminatedAt { get; init; }
+ ///
+ /// 解约原因。
+ ///
public string? TerminationReason { get; init; }
}
diff --git a/src/Application/TakeoutSaaS.Application/App/Merchants/Dto/MerchantDocumentDto.cs b/src/Application/TakeoutSaaS.Application/App/Merchants/Dto/MerchantDocumentDto.cs
index 8723031..0f4e8dd 100644
--- a/src/Application/TakeoutSaaS.Application/App/Merchants/Dto/MerchantDocumentDto.cs
+++ b/src/Application/TakeoutSaaS.Application/App/Merchants/Dto/MerchantDocumentDto.cs
@@ -9,25 +9,55 @@ namespace TakeoutSaaS.Application.App.Merchants.Dto;
///
public sealed class MerchantDocumentDto
{
+ ///
+ /// 证照 ID。
+ ///
[JsonConverter(typeof(SnowflakeIdJsonConverter))]
public long Id { get; init; }
+ ///
+ /// 商户 ID。
+ ///
[JsonConverter(typeof(SnowflakeIdJsonConverter))]
public long MerchantId { get; init; }
+ ///
+ /// 证照类型。
+ ///
public MerchantDocumentType DocumentType { get; init; }
+ ///
+ /// 审核状态。
+ ///
public MerchantDocumentStatus Status { get; init; }
+ ///
+ /// 文件地址。
+ ///
public string FileUrl { get; init; } = string.Empty;
+ ///
+ /// 证照编号。
+ ///
public string? DocumentNumber { get; init; }
+ ///
+ /// 签发时间。
+ ///
public DateTime? IssuedAt { get; init; }
+ ///
+ /// 过期时间。
+ ///
public DateTime? ExpiresAt { get; init; }
+ ///
+ /// 备注。
+ ///
public string? Remarks { get; init; }
+ ///
+ /// 创建时间。
+ ///
public DateTime CreatedAt { get; init; }
}
diff --git a/src/Application/TakeoutSaaS.Application/App/Merchants/Handlers/AddMerchantDocumentCommandHandler.cs b/src/Application/TakeoutSaaS.Application/App/Merchants/Handlers/AddMerchantDocumentCommandHandler.cs
index 2acfd29..1ca8cf1 100644
--- a/src/Application/TakeoutSaaS.Application/App/Merchants/Handlers/AddMerchantDocumentCommandHandler.cs
+++ b/src/Application/TakeoutSaaS.Application/App/Merchants/Handlers/AddMerchantDocumentCommandHandler.cs
@@ -22,6 +22,12 @@ public sealed class AddMerchantDocumentCommandHandler(
ICurrentUserAccessor currentUserAccessor)
: IRequestHandler
{
+ ///
+ /// 处理上传商户证照请求。
+ ///
+ /// 上传命令。
+ /// 取消标记。
+ /// 证照 DTO。
public async Task Handle(AddMerchantDocumentCommand request, CancellationToken cancellationToken)
{
// 1. 获取租户并查询商户
diff --git a/src/Application/TakeoutSaaS.Application/App/Merchants/Handlers/CreateMerchantCategoryCommandHandler.cs b/src/Application/TakeoutSaaS.Application/App/Merchants/Handlers/CreateMerchantCategoryCommandHandler.cs
index 645189c..917bfaa 100644
--- a/src/Application/TakeoutSaaS.Application/App/Merchants/Handlers/CreateMerchantCategoryCommandHandler.cs
+++ b/src/Application/TakeoutSaaS.Application/App/Merchants/Handlers/CreateMerchantCategoryCommandHandler.cs
@@ -17,6 +17,12 @@ public sealed class CreateMerchantCategoryCommandHandler(
ITenantProvider tenantProvider)
: IRequestHandler
{
+ ///
+ /// 处理创建商户类目请求。
+ ///
+ /// 创建命令。
+ /// 取消标记。
+ /// 类目 DTO。
public async Task Handle(CreateMerchantCategoryCommand request, CancellationToken cancellationToken)
{
// 1. 获取租户上下文
diff --git a/src/Application/TakeoutSaaS.Application/App/Merchants/Handlers/CreateMerchantContractCommandHandler.cs b/src/Application/TakeoutSaaS.Application/App/Merchants/Handlers/CreateMerchantContractCommandHandler.cs
index ff809dc..4d1a658 100644
--- a/src/Application/TakeoutSaaS.Application/App/Merchants/Handlers/CreateMerchantContractCommandHandler.cs
+++ b/src/Application/TakeoutSaaS.Application/App/Merchants/Handlers/CreateMerchantContractCommandHandler.cs
@@ -22,6 +22,12 @@ public sealed class CreateMerchantContractCommandHandler(
ICurrentUserAccessor currentUserAccessor)
: IRequestHandler
{
+ ///
+ /// 处理创建商户合同请求。
+ ///
+ /// 创建命令。
+ /// 取消标记。
+ /// 合同 DTO。
public async Task Handle(CreateMerchantContractCommand request, CancellationToken cancellationToken)
{
// 1. 校验时间
diff --git a/src/Application/TakeoutSaaS.Application/App/Merchants/Handlers/DeleteMerchantCategoryCommandHandler.cs b/src/Application/TakeoutSaaS.Application/App/Merchants/Handlers/DeleteMerchantCategoryCommandHandler.cs
index e4cf48e..316214e 100644
--- a/src/Application/TakeoutSaaS.Application/App/Merchants/Handlers/DeleteMerchantCategoryCommandHandler.cs
+++ b/src/Application/TakeoutSaaS.Application/App/Merchants/Handlers/DeleteMerchantCategoryCommandHandler.cs
@@ -13,6 +13,12 @@ public sealed class DeleteMerchantCategoryCommandHandler(
ITenantProvider tenantProvider)
: IRequestHandler
{
+ ///
+ /// 处理删除类目请求。
+ ///
+ /// 删除命令。
+ /// 取消标记。
+ /// 执行结果。
public async Task Handle(DeleteMerchantCategoryCommand request, CancellationToken cancellationToken)
{
// 1. 获取租户上下文
diff --git a/src/Application/TakeoutSaaS.Application/App/Merchants/Handlers/GetMerchantAuditLogsQueryHandler.cs b/src/Application/TakeoutSaaS.Application/App/Merchants/Handlers/GetMerchantAuditLogsQueryHandler.cs
index 2fd67e5..c14a842 100644
--- a/src/Application/TakeoutSaaS.Application/App/Merchants/Handlers/GetMerchantAuditLogsQueryHandler.cs
+++ b/src/Application/TakeoutSaaS.Application/App/Merchants/Handlers/GetMerchantAuditLogsQueryHandler.cs
@@ -15,6 +15,12 @@ public sealed class GetMerchantAuditLogsQueryHandler(
ITenantProvider tenantProvider)
: IRequestHandler>
{
+ ///
+ /// 查询商户审核日志列表。
+ ///
+ /// 查询请求。
+ /// 取消标记。
+ /// 分页结果。
public async Task> Handle(GetMerchantAuditLogsQuery request, CancellationToken cancellationToken)
{
// 1. 获取租户上下文并查询日志
diff --git a/src/Application/TakeoutSaaS.Application/App/Merchants/Handlers/GetMerchantCategoriesQueryHandler.cs b/src/Application/TakeoutSaaS.Application/App/Merchants/Handlers/GetMerchantCategoriesQueryHandler.cs
index 4ffc992..4cadf78 100644
--- a/src/Application/TakeoutSaaS.Application/App/Merchants/Handlers/GetMerchantCategoriesQueryHandler.cs
+++ b/src/Application/TakeoutSaaS.Application/App/Merchants/Handlers/GetMerchantCategoriesQueryHandler.cs
@@ -13,6 +13,12 @@ public sealed class GetMerchantCategoriesQueryHandler(
ITenantProvider tenantProvider)
: IRequestHandler>
{
+ ///
+ /// 查询启用的商户类目名称列表。
+ ///
+ /// 查询请求。
+ /// 取消标记。
+ /// 类目名称集合。
public async Task> Handle(GetMerchantCategoriesQuery request, CancellationToken cancellationToken)
{
// 1. 获取租户上下文并读取类目
diff --git a/src/Application/TakeoutSaaS.Application/App/Merchants/Handlers/GetMerchantContractsQueryHandler.cs b/src/Application/TakeoutSaaS.Application/App/Merchants/Handlers/GetMerchantContractsQueryHandler.cs
index 8ce236b..d4aab9d 100644
--- a/src/Application/TakeoutSaaS.Application/App/Merchants/Handlers/GetMerchantContractsQueryHandler.cs
+++ b/src/Application/TakeoutSaaS.Application/App/Merchants/Handlers/GetMerchantContractsQueryHandler.cs
@@ -16,6 +16,12 @@ public sealed class GetMerchantContractsQueryHandler(
ITenantProvider tenantProvider)
: IRequestHandler>
{
+ ///
+ /// 查询商户合同列表。
+ ///
+ /// 查询请求。
+ /// 取消标记。
+ /// 合同 DTO 列表。
public async Task> Handle(GetMerchantContractsQuery request, CancellationToken cancellationToken)
{
// 1. 获取租户上下文并校验商户存在
diff --git a/src/Application/TakeoutSaaS.Application/App/Merchants/Handlers/GetMerchantDetailQueryHandler.cs b/src/Application/TakeoutSaaS.Application/App/Merchants/Handlers/GetMerchantDetailQueryHandler.cs
index 0468a29..7ddbea3 100644
--- a/src/Application/TakeoutSaaS.Application/App/Merchants/Handlers/GetMerchantDetailQueryHandler.cs
+++ b/src/Application/TakeoutSaaS.Application/App/Merchants/Handlers/GetMerchantDetailQueryHandler.cs
@@ -16,6 +16,12 @@ public sealed class GetMerchantDetailQueryHandler(
ITenantProvider tenantProvider)
: IRequestHandler
{
+ ///
+ /// 查询商户详情,包括证照和合同。
+ ///
+ /// 查询请求。
+ /// 取消标记。
+ /// 商户详情 DTO。
public async Task Handle(GetMerchantDetailQuery request, CancellationToken cancellationToken)
{
// 1. 获取租户上下文并查询商户
diff --git a/src/Application/TakeoutSaaS.Application/App/Merchants/Handlers/GetMerchantDocumentsQueryHandler.cs b/src/Application/TakeoutSaaS.Application/App/Merchants/Handlers/GetMerchantDocumentsQueryHandler.cs
index c93f19c..df32509 100644
--- a/src/Application/TakeoutSaaS.Application/App/Merchants/Handlers/GetMerchantDocumentsQueryHandler.cs
+++ b/src/Application/TakeoutSaaS.Application/App/Merchants/Handlers/GetMerchantDocumentsQueryHandler.cs
@@ -16,6 +16,12 @@ public sealed class GetMerchantDocumentsQueryHandler(
ITenantProvider tenantProvider)
: IRequestHandler>
{
+ ///
+ /// 查询商户证照列表。
+ ///
+ /// 查询请求。
+ /// 取消标记。
+ /// 证照 DTO 列表。
public async Task> Handle(GetMerchantDocumentsQuery request, CancellationToken cancellationToken)
{
// 1. 获取租户上下文并校验商户存在
diff --git a/src/Application/TakeoutSaaS.Application/App/Merchants/Handlers/ListMerchantCategoriesQueryHandler.cs b/src/Application/TakeoutSaaS.Application/App/Merchants/Handlers/ListMerchantCategoriesQueryHandler.cs
index c0ba13b..04c46ac 100644
--- a/src/Application/TakeoutSaaS.Application/App/Merchants/Handlers/ListMerchantCategoriesQueryHandler.cs
+++ b/src/Application/TakeoutSaaS.Application/App/Merchants/Handlers/ListMerchantCategoriesQueryHandler.cs
@@ -14,6 +14,12 @@ public sealed class ListMerchantCategoriesQueryHandler(
ITenantProvider tenantProvider)
: IRequestHandler>
{
+ ///
+ /// 列出所有类目。
+ ///
+ /// 查询请求。
+ /// 取消标记。
+ /// 类目 DTO 列表。
public async Task> Handle(ListMerchantCategoriesQuery request, CancellationToken cancellationToken)
{
// 1. 获取租户上下文
diff --git a/src/Application/TakeoutSaaS.Application/App/Merchants/Handlers/ReorderMerchantCategoriesCommandHandler.cs b/src/Application/TakeoutSaaS.Application/App/Merchants/Handlers/ReorderMerchantCategoriesCommandHandler.cs
index cb71205..acd0242 100644
--- a/src/Application/TakeoutSaaS.Application/App/Merchants/Handlers/ReorderMerchantCategoriesCommandHandler.cs
+++ b/src/Application/TakeoutSaaS.Application/App/Merchants/Handlers/ReorderMerchantCategoriesCommandHandler.cs
@@ -15,6 +15,12 @@ public sealed class ReorderMerchantCategoriesCommandHandler(
ITenantProvider tenantProvider)
: IRequestHandler
{
+ ///
+ /// 调整类目排序。
+ ///
+ /// 排序命令。
+ /// 取消标记。
+ /// 执行结果。
public async Task Handle(ReorderMerchantCategoriesCommand request, CancellationToken cancellationToken)
{
// 1. 获取租户并查询类目
diff --git a/src/Application/TakeoutSaaS.Application/App/Merchants/Handlers/ReviewMerchantCommandHandler.cs b/src/Application/TakeoutSaaS.Application/App/Merchants/Handlers/ReviewMerchantCommandHandler.cs
index c684c09..1d67950 100644
--- a/src/Application/TakeoutSaaS.Application/App/Merchants/Handlers/ReviewMerchantCommandHandler.cs
+++ b/src/Application/TakeoutSaaS.Application/App/Merchants/Handlers/ReviewMerchantCommandHandler.cs
@@ -20,6 +20,12 @@ public sealed class ReviewMerchantCommandHandler(
ICurrentUserAccessor currentUserAccessor)
: IRequestHandler
{
+ ///
+ /// 审核商户。
+ ///
+ /// 审核命令。
+ /// 取消标记。
+ /// 商户 DTO。
public async Task Handle(ReviewMerchantCommand request, CancellationToken cancellationToken)
{
// 1. 读取商户
diff --git a/src/Application/TakeoutSaaS.Application/App/Merchants/Handlers/ReviewMerchantDocumentCommandHandler.cs b/src/Application/TakeoutSaaS.Application/App/Merchants/Handlers/ReviewMerchantDocumentCommandHandler.cs
index 7260afb..a8a037f 100644
--- a/src/Application/TakeoutSaaS.Application/App/Merchants/Handlers/ReviewMerchantDocumentCommandHandler.cs
+++ b/src/Application/TakeoutSaaS.Application/App/Merchants/Handlers/ReviewMerchantDocumentCommandHandler.cs
@@ -20,6 +20,12 @@ public sealed class ReviewMerchantDocumentCommandHandler(
ICurrentUserAccessor currentUserAccessor)
: IRequestHandler
{
+ ///
+ /// 审核商户证照。
+ ///
+ /// 审核命令。
+ /// 取消标记。
+ /// 证照 DTO。
public async Task Handle(ReviewMerchantDocumentCommand request, CancellationToken cancellationToken)
{
// 1. 读取证照
diff --git a/src/Application/TakeoutSaaS.Application/App/Merchants/Handlers/UpdateMerchantContractStatusCommandHandler.cs b/src/Application/TakeoutSaaS.Application/App/Merchants/Handlers/UpdateMerchantContractStatusCommandHandler.cs
index 2d2ba95..1fc4707 100644
--- a/src/Application/TakeoutSaaS.Application/App/Merchants/Handlers/UpdateMerchantContractStatusCommandHandler.cs
+++ b/src/Application/TakeoutSaaS.Application/App/Merchants/Handlers/UpdateMerchantContractStatusCommandHandler.cs
@@ -20,6 +20,12 @@ public sealed class UpdateMerchantContractStatusCommandHandler(
ICurrentUserAccessor currentUserAccessor)
: IRequestHandler
{
+ ///
+ /// 更新合同状态。
+ ///
+ /// 状态变更命令。
+ /// 取消标记。
+ /// 合同 DTO。
public async Task Handle(UpdateMerchantContractStatusCommand request, CancellationToken cancellationToken)
{
// 1. 查询合同
diff --git a/src/Application/TakeoutSaaS.Application/App/Merchants/MerchantMapping.cs b/src/Application/TakeoutSaaS.Application/App/Merchants/MerchantMapping.cs
index 4b52d54..157dbc1 100644
--- a/src/Application/TakeoutSaaS.Application/App/Merchants/MerchantMapping.cs
+++ b/src/Application/TakeoutSaaS.Application/App/Merchants/MerchantMapping.cs
@@ -8,6 +8,11 @@ namespace TakeoutSaaS.Application.App.Merchants;
///
internal static class MerchantMapping
{
+ ///
+ /// 将商户实体映射为 DTO。
+ ///
+ /// 商户实体。
+ /// 商户 DTO。
public static MerchantDto ToDto(Merchant merchant) => new()
{
Id = merchant.Id,
@@ -23,6 +28,11 @@ internal static class MerchantMapping
CreatedAt = merchant.CreatedAt
};
+ ///
+ /// 将商户证照实体映射为 DTO。
+ ///
+ /// 证照实体。
+ /// 证照 DTO。
public static MerchantDocumentDto ToDto(MerchantDocument document) => new()
{
Id = document.Id,
@@ -37,6 +47,11 @@ internal static class MerchantMapping
CreatedAt = document.CreatedAt
};
+ ///
+ /// 将商户合同实体映射为 DTO。
+ ///
+ /// 合同实体。
+ /// 合同 DTO。
public static MerchantContractDto ToDto(MerchantContract contract) => new()
{
Id = contract.Id,
@@ -51,6 +66,11 @@ internal static class MerchantMapping
TerminationReason = contract.TerminationReason
};
+ ///
+ /// 将商户审核日志实体映射为 DTO。
+ ///
+ /// 审核日志实体。
+ /// 审核日志 DTO。
public static MerchantAuditLogDto ToDto(MerchantAuditLog log) => new()
{
Id = log.Id,
@@ -62,6 +82,11 @@ internal static class MerchantMapping
CreatedAt = log.CreatedAt
};
+ ///
+ /// 将商户分类实体映射为 DTO。
+ ///
+ /// 分类实体。
+ /// 分类 DTO。
public static MerchantCategoryDto ToDto(MerchantCategory category) => new()
{
Id = category.Id,
@@ -71,12 +96,27 @@ internal static class MerchantMapping
CreatedAt = category.CreatedAt
};
+ ///
+ /// 将证照集合映射为 DTO 集合。
+ ///
+ /// 证照集合。
+ /// 证照 DTO 列表。
public static IReadOnlyList ToDocumentDtos(IEnumerable documents)
=> documents.Select(ToDto).ToList();
+ ///
+ /// 将合同集合映射为 DTO 集合。
+ ///
+ /// 合同集合。
+ /// 合同 DTO 列表。
public static IReadOnlyList ToContractDtos(IEnumerable contracts)
=> contracts.Select(ToDto).ToList();
+ ///
+ /// 将分类集合映射为 DTO 集合。
+ ///
+ /// 分类集合。
+ /// 分类 DTO 列表。
public static IReadOnlyList ToCategoryDtos(IEnumerable categories)
=> categories.Select(ToDto).ToList();
}