From 2da009c68afe862b1d4fffafa92e0bc94db1e4bb Mon Sep 17 00:00:00 2001 From: MSuMshk <2039814060@qq.com> Date: Fri, 12 Dec 2025 11:29:15 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20=E8=A1=A5=E5=85=A8=E7=A7=9F=E6=88=B7?= =?UTF-8?q?=E4=B8=8E=E5=AD=97=E5=85=B8=E6=A8=A1=E5=9D=97=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- MISSING_XML_DOCS.md | 17 ------- .../CreateTenantAnnouncementCommandHandler.cs | 6 +++ .../CreateTenantBillingCommandHandler.cs | 6 +++ .../DeleteTenantAnnouncementCommandHandler.cs | 6 +++ .../GetTenantAnnouncementQueryHandler.cs | 6 +++ .../Handlers/GetTenantBillQueryHandler.cs | 6 +++ ...arkTenantAnnouncementReadCommandHandler.cs | 6 +++ .../MarkTenantBillingPaidCommandHandler.cs | 6 +++ ...arkTenantNotificationReadCommandHandler.cs | 6 +++ .../SearchTenantAnnouncementsQueryHandler.cs | 6 +++ .../Handlers/SearchTenantBillsQueryHandler.cs | 6 +++ .../SearchTenantNotificationsQueryHandler.cs | 6 +++ .../App/Tenants/TenantMapping.cs | 44 +++++++++++++++++ .../Dictionary/Models/DictionaryGroupDto.cs | 21 ++++++++ .../Dictionary/Models/DictionaryItemDto.cs | 24 ++++++++++ .../Services/DictionaryAppService.cs | 48 +++++++++++++++++++ .../Abstractions/IWeChatAuthService.cs | 17 +++++++ 17 files changed, 220 insertions(+), 17 deletions(-) diff --git a/MISSING_XML_DOCS.md b/MISSING_XML_DOCS.md index e2930f7..b025724 100644 --- a/MISSING_XML_DOCS.md +++ b/MISSING_XML_DOCS.md @@ -24,20 +24,3 @@ - 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 -- src/Application/TakeoutSaaS.Application/App/Tenants/Handlers/CreateTenantAnnouncementCommandHandler.cs:17 -- src/Application/TakeoutSaaS.Application/App/Tenants/Handlers/CreateTenantBillingCommandHandler.cs:17 -- src/Application/TakeoutSaaS.Application/App/Tenants/Handlers/DeleteTenantAnnouncementCommandHandler.cs:13 -- src/Application/TakeoutSaaS.Application/App/Tenants/Handlers/GetTenantAnnouncementQueryHandler.cs:18 -- src/Application/TakeoutSaaS.Application/App/Tenants/Handlers/GetTenantBillQueryHandler.cs:14 -- src/Application/TakeoutSaaS.Application/App/Tenants/Handlers/MarkTenantAnnouncementReadCommandHandler.cs:19 -- src/Application/TakeoutSaaS.Application/App/Tenants/Handlers/MarkTenantBillingPaidCommandHandler.cs:15 -- src/Application/TakeoutSaaS.Application/App/Tenants/Handlers/MarkTenantNotificationReadCommandHandler.cs:14 -- src/Application/TakeoutSaaS.Application/App/Tenants/Handlers/SearchTenantAnnouncementsQueryHandler.cs:19 -- src/Application/TakeoutSaaS.Application/App/Tenants/Handlers/SearchTenantBillsQueryHandler.cs:15 -- src/Application/TakeoutSaaS.Application/App/Tenants/Handlers/SearchTenantNotificationsQueryHandler.cs:15 -- src/Application/TakeoutSaaS.Application/App/Tenants/Handlers/UpdateTenantAnnouncementCommandHandler.cs:16 -- src/Application/TakeoutSaaS.Application/App/Tenants/TenantMapping.cs:11 -- src/Application/TakeoutSaaS.Application/Dictionary/Models/DictionaryGroupDto.cs:13 -- src/Application/TakeoutSaaS.Application/Dictionary/Models/DictionaryItemDto.cs:12 -- src/Application/TakeoutSaaS.Application/Dictionary/Services/DictionaryAppService.cs:23 -- src/Application/TakeoutSaaS.Application/Identity/Abstractions/IWeChatAuthService.cs:16 diff --git a/src/Application/TakeoutSaaS.Application/App/Tenants/Handlers/CreateTenantAnnouncementCommandHandler.cs b/src/Application/TakeoutSaaS.Application/App/Tenants/Handlers/CreateTenantAnnouncementCommandHandler.cs index 4894acb..d0dce5f 100644 --- a/src/Application/TakeoutSaaS.Application/App/Tenants/Handlers/CreateTenantAnnouncementCommandHandler.cs +++ b/src/Application/TakeoutSaaS.Application/App/Tenants/Handlers/CreateTenantAnnouncementCommandHandler.cs @@ -14,6 +14,12 @@ namespace TakeoutSaaS.Application.App.Tenants.Handlers; public sealed class CreateTenantAnnouncementCommandHandler(ITenantAnnouncementRepository announcementRepository) : IRequestHandler { + /// + /// 处理创建租户公告请求。 + /// + /// 创建命令。 + /// 取消标记。 + /// 公告 DTO。 public async Task Handle(CreateTenantAnnouncementCommand request, CancellationToken cancellationToken) { // 1. 校验标题与内容 diff --git a/src/Application/TakeoutSaaS.Application/App/Tenants/Handlers/CreateTenantBillingCommandHandler.cs b/src/Application/TakeoutSaaS.Application/App/Tenants/Handlers/CreateTenantBillingCommandHandler.cs index 42b629c..3819e63 100644 --- a/src/Application/TakeoutSaaS.Application/App/Tenants/Handlers/CreateTenantBillingCommandHandler.cs +++ b/src/Application/TakeoutSaaS.Application/App/Tenants/Handlers/CreateTenantBillingCommandHandler.cs @@ -14,6 +14,12 @@ namespace TakeoutSaaS.Application.App.Tenants.Handlers; public sealed class CreateTenantBillingCommandHandler(ITenantBillingRepository billingRepository) : IRequestHandler { + /// + /// 处理创建租户账单请求。 + /// + /// 创建命令。 + /// 取消标记。 + /// 账单 DTO。 public async Task Handle(CreateTenantBillingCommand request, CancellationToken cancellationToken) { // 1. 校验账单编号 diff --git a/src/Application/TakeoutSaaS.Application/App/Tenants/Handlers/DeleteTenantAnnouncementCommandHandler.cs b/src/Application/TakeoutSaaS.Application/App/Tenants/Handlers/DeleteTenantAnnouncementCommandHandler.cs index d479dfd..ca38d89 100644 --- a/src/Application/TakeoutSaaS.Application/App/Tenants/Handlers/DeleteTenantAnnouncementCommandHandler.cs +++ b/src/Application/TakeoutSaaS.Application/App/Tenants/Handlers/DeleteTenantAnnouncementCommandHandler.cs @@ -10,6 +10,12 @@ namespace TakeoutSaaS.Application.App.Tenants.Handlers; public sealed class DeleteTenantAnnouncementCommandHandler(ITenantAnnouncementRepository announcementRepository) : IRequestHandler { + /// + /// 处理删除公告请求。 + /// + /// 删除命令。 + /// 取消标记。 + /// 执行结果。 public async Task Handle(DeleteTenantAnnouncementCommand request, CancellationToken cancellationToken) { // 1. 删除公告 diff --git a/src/Application/TakeoutSaaS.Application/App/Tenants/Handlers/GetTenantAnnouncementQueryHandler.cs b/src/Application/TakeoutSaaS.Application/App/Tenants/Handlers/GetTenantAnnouncementQueryHandler.cs index 90fa4b1..9c3d31d 100644 --- a/src/Application/TakeoutSaaS.Application/App/Tenants/Handlers/GetTenantAnnouncementQueryHandler.cs +++ b/src/Application/TakeoutSaaS.Application/App/Tenants/Handlers/GetTenantAnnouncementQueryHandler.cs @@ -15,6 +15,12 @@ public sealed class GetTenantAnnouncementQueryHandler( ICurrentUserAccessor? currentUserAccessor = null) : IRequestHandler { + /// + /// 查询公告详情。 + /// + /// 查询请求。 + /// 取消标记。 + /// 公告 DTO 或 null。 public async Task Handle(GetTenantAnnouncementQuery request, CancellationToken cancellationToken) { // 1. 查询公告主体 diff --git a/src/Application/TakeoutSaaS.Application/App/Tenants/Handlers/GetTenantBillQueryHandler.cs b/src/Application/TakeoutSaaS.Application/App/Tenants/Handlers/GetTenantBillQueryHandler.cs index 5dbd0e2..18a6aae 100644 --- a/src/Application/TakeoutSaaS.Application/App/Tenants/Handlers/GetTenantBillQueryHandler.cs +++ b/src/Application/TakeoutSaaS.Application/App/Tenants/Handlers/GetTenantBillQueryHandler.cs @@ -11,6 +11,12 @@ namespace TakeoutSaaS.Application.App.Tenants.Handlers; public sealed class GetTenantBillQueryHandler(ITenantBillingRepository billingRepository) : IRequestHandler { + /// + /// 查询账单详情。 + /// + /// 查询请求。 + /// 取消标记。 + /// 账单 DTO 或 null。 public async Task Handle(GetTenantBillQuery request, CancellationToken cancellationToken) { // 1. 查询账单 diff --git a/src/Application/TakeoutSaaS.Application/App/Tenants/Handlers/MarkTenantAnnouncementReadCommandHandler.cs b/src/Application/TakeoutSaaS.Application/App/Tenants/Handlers/MarkTenantAnnouncementReadCommandHandler.cs index 1600ecf..a26b02e 100644 --- a/src/Application/TakeoutSaaS.Application/App/Tenants/Handlers/MarkTenantAnnouncementReadCommandHandler.cs +++ b/src/Application/TakeoutSaaS.Application/App/Tenants/Handlers/MarkTenantAnnouncementReadCommandHandler.cs @@ -16,6 +16,12 @@ public sealed class MarkTenantAnnouncementReadCommandHandler( ICurrentUserAccessor? currentUserAccessor = null) : IRequestHandler { + /// + /// 标记公告已读。 + /// + /// 标记命令。 + /// 取消标记。 + /// 公告 DTO 或 null。 public async Task Handle(MarkTenantAnnouncementReadCommand request, CancellationToken cancellationToken) { // 1. 查询公告 diff --git a/src/Application/TakeoutSaaS.Application/App/Tenants/Handlers/MarkTenantBillingPaidCommandHandler.cs b/src/Application/TakeoutSaaS.Application/App/Tenants/Handlers/MarkTenantBillingPaidCommandHandler.cs index 6727959..5ad5776 100644 --- a/src/Application/TakeoutSaaS.Application/App/Tenants/Handlers/MarkTenantBillingPaidCommandHandler.cs +++ b/src/Application/TakeoutSaaS.Application/App/Tenants/Handlers/MarkTenantBillingPaidCommandHandler.cs @@ -12,6 +12,12 @@ namespace TakeoutSaaS.Application.App.Tenants.Handlers; public sealed class MarkTenantBillingPaidCommandHandler(ITenantBillingRepository billingRepository) : IRequestHandler { + /// + /// 标记账单支付。 + /// + /// 标记命令。 + /// 取消标记。 + /// 账单 DTO 或 null。 public async Task Handle(MarkTenantBillingPaidCommand request, CancellationToken cancellationToken) { // 1. 查询账单 diff --git a/src/Application/TakeoutSaaS.Application/App/Tenants/Handlers/MarkTenantNotificationReadCommandHandler.cs b/src/Application/TakeoutSaaS.Application/App/Tenants/Handlers/MarkTenantNotificationReadCommandHandler.cs index 1d91e66..6fd9a8f 100644 --- a/src/Application/TakeoutSaaS.Application/App/Tenants/Handlers/MarkTenantNotificationReadCommandHandler.cs +++ b/src/Application/TakeoutSaaS.Application/App/Tenants/Handlers/MarkTenantNotificationReadCommandHandler.cs @@ -11,6 +11,12 @@ namespace TakeoutSaaS.Application.App.Tenants.Handlers; public sealed class MarkTenantNotificationReadCommandHandler(ITenantNotificationRepository notificationRepository) : IRequestHandler { + /// + /// 标记通知已读。 + /// + /// 标记命令。 + /// 取消标记。 + /// 通知 DTO 或 null。 public async Task Handle(MarkTenantNotificationReadCommand request, CancellationToken cancellationToken) { // 1. 查询通知 diff --git a/src/Application/TakeoutSaaS.Application/App/Tenants/Handlers/SearchTenantAnnouncementsQueryHandler.cs b/src/Application/TakeoutSaaS.Application/App/Tenants/Handlers/SearchTenantAnnouncementsQueryHandler.cs index 2c15546..ed16f35 100644 --- a/src/Application/TakeoutSaaS.Application/App/Tenants/Handlers/SearchTenantAnnouncementsQueryHandler.cs +++ b/src/Application/TakeoutSaaS.Application/App/Tenants/Handlers/SearchTenantAnnouncementsQueryHandler.cs @@ -16,6 +16,12 @@ public sealed class SearchTenantAnnouncementsQueryHandler( ICurrentUserAccessor? currentUserAccessor = null) : IRequestHandler> { + /// + /// 分页查询公告列表。 + /// + /// 查询条件。 + /// 取消标记。 + /// 分页结果。 public async Task> Handle(SearchTenantAnnouncementsQuery request, CancellationToken cancellationToken) { // 1. 过滤有效期条件 diff --git a/src/Application/TakeoutSaaS.Application/App/Tenants/Handlers/SearchTenantBillsQueryHandler.cs b/src/Application/TakeoutSaaS.Application/App/Tenants/Handlers/SearchTenantBillsQueryHandler.cs index 66821fc..d20ebf6 100644 --- a/src/Application/TakeoutSaaS.Application/App/Tenants/Handlers/SearchTenantBillsQueryHandler.cs +++ b/src/Application/TakeoutSaaS.Application/App/Tenants/Handlers/SearchTenantBillsQueryHandler.cs @@ -12,6 +12,12 @@ namespace TakeoutSaaS.Application.App.Tenants.Handlers; public sealed class SearchTenantBillsQueryHandler(ITenantBillingRepository billingRepository) : IRequestHandler> { + /// + /// 分页查询账单列表。 + /// + /// 查询条件。 + /// 取消标记。 + /// 分页结果。 public async Task> Handle(SearchTenantBillsQuery request, CancellationToken cancellationToken) { // 1. 查询账单 diff --git a/src/Application/TakeoutSaaS.Application/App/Tenants/Handlers/SearchTenantNotificationsQueryHandler.cs b/src/Application/TakeoutSaaS.Application/App/Tenants/Handlers/SearchTenantNotificationsQueryHandler.cs index 294a639..b74ada5 100644 --- a/src/Application/TakeoutSaaS.Application/App/Tenants/Handlers/SearchTenantNotificationsQueryHandler.cs +++ b/src/Application/TakeoutSaaS.Application/App/Tenants/Handlers/SearchTenantNotificationsQueryHandler.cs @@ -12,6 +12,12 @@ namespace TakeoutSaaS.Application.App.Tenants.Handlers; public sealed class SearchTenantNotificationsQueryHandler(ITenantNotificationRepository notificationRepository) : IRequestHandler> { + /// + /// 分页查询通知列表。 + /// + /// 查询条件。 + /// 取消标记。 + /// 分页结果。 public async Task> Handle(SearchTenantNotificationsQuery request, CancellationToken cancellationToken) { // 1. 查询通知 diff --git a/src/Application/TakeoutSaaS.Application/App/Tenants/TenantMapping.cs b/src/Application/TakeoutSaaS.Application/App/Tenants/TenantMapping.cs index 24f7b44..667d68e 100644 --- a/src/Application/TakeoutSaaS.Application/App/Tenants/TenantMapping.cs +++ b/src/Application/TakeoutSaaS.Application/App/Tenants/TenantMapping.cs @@ -8,6 +8,13 @@ namespace TakeoutSaaS.Application.App.Tenants; /// internal static class TenantMapping { + /// + /// 将租户实体与订阅、认证信息映射为租户 DTO。 + /// + /// 租户实体。 + /// 订阅信息。 + /// 认证信息。 + /// 租户 DTO。 public static TenantDto ToDto(Tenant tenant, TenantSubscription? subscription, TenantVerificationProfile? verification) => new() { @@ -26,6 +33,11 @@ internal static class TenantMapping AutoRenew = subscription?.AutoRenew ?? false }; + /// + /// 将租户认证实体映射为 DTO。 + /// + /// 认证实体。 + /// 认证 DTO 或 null。 public static TenantVerificationDto? ToVerificationDto(this TenantVerificationProfile? profile) => profile == null ? null @@ -45,6 +57,11 @@ internal static class TenantMapping ReviewedAt = profile.ReviewedAt }; + /// + /// 将订阅实体映射为 DTO。 + /// + /// 订阅实体。 + /// 订阅 DTO 或 null。 public static TenantSubscriptionDto? ToSubscriptionDto(this TenantSubscription? subscription) => subscription == null ? null @@ -60,6 +77,11 @@ internal static class TenantMapping AutoRenew = subscription.AutoRenew }; + /// + /// 将审计日志实体映射为 DTO。 + /// + /// 审计日志实体。 + /// 审计日志 DTO。 public static TenantAuditLogDto ToDto(this TenantAuditLog log) => new() { @@ -74,6 +96,11 @@ internal static class TenantMapping CreatedAt = log.CreatedAt }; + /// + /// 将套餐实体映射为 DTO。 + /// + /// 套餐实体。 + /// 套餐 DTO。 public static TenantPackageDto ToDto(this TenantPackage package) => new() { @@ -93,6 +120,11 @@ internal static class TenantMapping SortOrder = package.SortOrder }; + /// + /// 将账单实体映射为 DTO。 + /// + /// 账单实体。 + /// 账单 DTO。 public static TenantBillingDto ToDto(this TenantBillingStatement bill) => new() { @@ -108,6 +140,13 @@ internal static class TenantMapping LineItemsJson = bill.LineItemsJson }; + /// + /// 将公告实体映射为 DTO。 + /// + /// 公告实体。 + /// 是否已读。 + /// 阅读时间。 + /// 公告 DTO。 public static TenantAnnouncementDto ToDto(this TenantAnnouncement announcement, bool isRead, DateTime? readAt) => new() { @@ -124,6 +163,11 @@ internal static class TenantMapping ReadAt = readAt }; + /// + /// 将通知实体映射为 DTO。 + /// + /// 通知实体。 + /// 通知 DTO。 public static TenantNotificationDto ToDto(this TenantNotification notification) => new() { diff --git a/src/Application/TakeoutSaaS.Application/Dictionary/Models/DictionaryGroupDto.cs b/src/Application/TakeoutSaaS.Application/Dictionary/Models/DictionaryGroupDto.cs index cdee6bf..d932554 100644 --- a/src/Application/TakeoutSaaS.Application/Dictionary/Models/DictionaryGroupDto.cs +++ b/src/Application/TakeoutSaaS.Application/Dictionary/Models/DictionaryGroupDto.cs @@ -9,18 +9,39 @@ namespace TakeoutSaaS.Application.Dictionary.Models; /// public sealed class DictionaryGroupDto { + /// + /// 分组 ID。 + /// [JsonConverter(typeof(SnowflakeIdJsonConverter))] public long Id { get; init; } + /// + /// 分组编码。 + /// public string Code { get; init; } = string.Empty; + /// + /// 分组名称。 + /// public string Name { get; init; } = string.Empty; + /// + /// 字典作用域。 + /// public DictionaryScope Scope { get; init; } + /// + /// 描述。 + /// public string? Description { get; init; } + /// + /// 是否启用。 + /// public bool IsEnabled { get; init; } + /// + /// 字典项集合。 + /// public IReadOnlyList Items { get; init; } = Array.Empty(); } diff --git a/src/Application/TakeoutSaaS.Application/Dictionary/Models/DictionaryItemDto.cs b/src/Application/TakeoutSaaS.Application/Dictionary/Models/DictionaryItemDto.cs index f154f3e..c0282ad 100644 --- a/src/Application/TakeoutSaaS.Application/Dictionary/Models/DictionaryItemDto.cs +++ b/src/Application/TakeoutSaaS.Application/Dictionary/Models/DictionaryItemDto.cs @@ -8,21 +8,45 @@ namespace TakeoutSaaS.Application.Dictionary.Models; /// public sealed class DictionaryItemDto { + /// + /// 字典项 ID。 + /// [JsonConverter(typeof(SnowflakeIdJsonConverter))] public long Id { get; init; } + /// + /// 分组 ID。 + /// [JsonConverter(typeof(SnowflakeIdJsonConverter))] public long GroupId { get; init; } + /// + /// 键。 + /// public string Key { get; init; } = string.Empty; + /// + /// 值。 + /// public string Value { get; init; } = string.Empty; + /// + /// 是否默认值。 + /// public bool IsDefault { get; init; } + /// + /// 是否启用。 + /// public bool IsEnabled { get; init; } + /// + /// 排序序号。 + /// public int SortOrder { get; init; } + /// + /// 描述。 + /// public string? Description { get; init; } } diff --git a/src/Application/TakeoutSaaS.Application/Dictionary/Services/DictionaryAppService.cs b/src/Application/TakeoutSaaS.Application/Dictionary/Services/DictionaryAppService.cs index 65616a8..fd59e46 100644 --- a/src/Application/TakeoutSaaS.Application/Dictionary/Services/DictionaryAppService.cs +++ b/src/Application/TakeoutSaaS.Application/Dictionary/Services/DictionaryAppService.cs @@ -20,6 +20,12 @@ public sealed class DictionaryAppService( ITenantProvider tenantProvider, ILogger logger) : IDictionaryAppService { + /// + /// 创建字典分组。 + /// + /// 创建请求。 + /// 取消标记。 + /// 分组 DTO。 public async Task CreateGroupAsync(CreateDictionaryGroupRequest request, CancellationToken cancellationToken = default) { // 1. 规范化编码并确定租户 @@ -52,6 +58,13 @@ public sealed class DictionaryAppService( return MapGroup(group, includeItems: false); } + /// + /// 更新字典分组。 + /// + /// 分组 ID。 + /// 更新请求。 + /// 取消标记。 + /// 分组 DTO。 public async Task UpdateGroupAsync(long groupId, UpdateDictionaryGroupRequest request, CancellationToken cancellationToken = default) { // 1. 读取分组并校验权限 @@ -70,6 +83,11 @@ public sealed class DictionaryAppService( return MapGroup(group, includeItems: false); } + /// + /// 删除字典分组。 + /// + /// 分组 ID。 + /// 取消标记。 public async Task DeleteGroupAsync(long groupId, CancellationToken cancellationToken = default) { // 1. 读取分组并校验权限 @@ -83,6 +101,12 @@ public sealed class DictionaryAppService( logger.LogInformation("删除字典分组:{GroupId}", group.Id); } + /// + /// 搜索字典分组。 + /// + /// 查询条件。 + /// 取消标记。 + /// 分组列表。 public async Task> SearchGroupsAsync(DictionaryGroupQuery request, CancellationToken cancellationToken = default) { // 1. 确定查询范围并校验权限 @@ -111,6 +135,12 @@ public sealed class DictionaryAppService( return result; } + /// + /// 创建字典项。 + /// + /// 创建请求。 + /// 取消标记。 + /// 字典项 DTO。 public async Task CreateItemAsync(CreateDictionaryItemRequest request, CancellationToken cancellationToken = default) { // 1. 校验分组与权限 @@ -139,6 +169,13 @@ public sealed class DictionaryAppService( return MapItem(item); } + /// + /// 更新字典项。 + /// + /// 字典项 ID。 + /// 更新请求。 + /// 取消标记。 + /// 字典项 DTO。 public async Task UpdateItemAsync(long itemId, UpdateDictionaryItemRequest request, CancellationToken cancellationToken = default) { // 1. 读取字典项与分组并校验权限 @@ -160,6 +197,11 @@ public sealed class DictionaryAppService( return MapItem(item); } + /// + /// 删除字典项。 + /// + /// 字典项 ID。 + /// 取消标记。 public async Task DeleteItemAsync(long itemId, CancellationToken cancellationToken = default) { // 1. 读取字典项与分组并校验权限 @@ -174,6 +216,12 @@ public sealed class DictionaryAppService( logger.LogInformation("删除字典项:{ItemId}", item.Id); } + /// + /// 批量获取缓存中的字典项。 + /// + /// 批量查询请求。 + /// 取消标记。 + /// 按编码分组的字典项集合。 public async Task>> GetCachedItemsAsync(DictionaryBatchQueryRequest request, CancellationToken cancellationToken = default) { // 1. 规范化编码 diff --git a/src/Application/TakeoutSaaS.Application/Identity/Abstractions/IWeChatAuthService.cs b/src/Application/TakeoutSaaS.Application/Identity/Abstractions/IWeChatAuthService.cs index c53b72c..d3465ef 100644 --- a/src/Application/TakeoutSaaS.Application/Identity/Abstractions/IWeChatAuthService.cs +++ b/src/Application/TakeoutSaaS.Application/Identity/Abstractions/IWeChatAuthService.cs @@ -5,6 +5,12 @@ namespace TakeoutSaaS.Application.Identity.Abstractions; /// public interface IWeChatAuthService { + /// + /// 调用微信接口完成 code2Session 交换。 + /// + /// 临时登录凭证 code。 + /// 取消标记。 + /// 会话信息。 Task Code2SessionAsync(string code, CancellationToken cancellationToken = default); } @@ -13,7 +19,18 @@ public interface IWeChatAuthService /// public sealed class WeChatSessionInfo { + /// + /// OpenId。 + /// public string OpenId { get; init; } = string.Empty; + + /// + /// UnionId。 + /// public string? UnionId { get; init; } + + /// + /// 会话密钥。 + /// public string SessionKey { get; init; } = string.Empty; }