docs: 补全租户与字典模块注释

This commit is contained in:
2025-12-12 11:29:15 +08:00
parent 641598de86
commit 2da009c68a
17 changed files with 220 additions and 17 deletions

View File

@@ -14,6 +14,12 @@ namespace TakeoutSaaS.Application.App.Tenants.Handlers;
public sealed class CreateTenantAnnouncementCommandHandler(ITenantAnnouncementRepository announcementRepository)
: IRequestHandler<CreateTenantAnnouncementCommand, TenantAnnouncementDto>
{
/// <summary>
/// 处理创建租户公告请求。
/// </summary>
/// <param name="request">创建命令。</param>
/// <param name="cancellationToken">取消标记。</param>
/// <returns>公告 DTO。</returns>
public async Task<TenantAnnouncementDto> Handle(CreateTenantAnnouncementCommand request, CancellationToken cancellationToken)
{
// 1. 校验标题与内容

View File

@@ -14,6 +14,12 @@ namespace TakeoutSaaS.Application.App.Tenants.Handlers;
public sealed class CreateTenantBillingCommandHandler(ITenantBillingRepository billingRepository)
: IRequestHandler<CreateTenantBillingCommand, TenantBillingDto>
{
/// <summary>
/// 处理创建租户账单请求。
/// </summary>
/// <param name="request">创建命令。</param>
/// <param name="cancellationToken">取消标记。</param>
/// <returns>账单 DTO。</returns>
public async Task<TenantBillingDto> Handle(CreateTenantBillingCommand request, CancellationToken cancellationToken)
{
// 1. 校验账单编号

View File

@@ -10,6 +10,12 @@ namespace TakeoutSaaS.Application.App.Tenants.Handlers;
public sealed class DeleteTenantAnnouncementCommandHandler(ITenantAnnouncementRepository announcementRepository)
: IRequestHandler<DeleteTenantAnnouncementCommand, bool>
{
/// <summary>
/// 处理删除公告请求。
/// </summary>
/// <param name="request">删除命令。</param>
/// <param name="cancellationToken">取消标记。</param>
/// <returns>执行结果。</returns>
public async Task<bool> Handle(DeleteTenantAnnouncementCommand request, CancellationToken cancellationToken)
{
// 1. 删除公告

View File

@@ -15,6 +15,12 @@ public sealed class GetTenantAnnouncementQueryHandler(
ICurrentUserAccessor? currentUserAccessor = null)
: IRequestHandler<GetTenantAnnouncementQuery, TenantAnnouncementDto?>
{
/// <summary>
/// 查询公告详情。
/// </summary>
/// <param name="request">查询请求。</param>
/// <param name="cancellationToken">取消标记。</param>
/// <returns>公告 DTO 或 null。</returns>
public async Task<TenantAnnouncementDto?> Handle(GetTenantAnnouncementQuery request, CancellationToken cancellationToken)
{
// 1. 查询公告主体

View File

@@ -11,6 +11,12 @@ namespace TakeoutSaaS.Application.App.Tenants.Handlers;
public sealed class GetTenantBillQueryHandler(ITenantBillingRepository billingRepository)
: IRequestHandler<GetTenantBillQuery, TenantBillingDto?>
{
/// <summary>
/// 查询账单详情。
/// </summary>
/// <param name="request">查询请求。</param>
/// <param name="cancellationToken">取消标记。</param>
/// <returns>账单 DTO 或 null。</returns>
public async Task<TenantBillingDto?> Handle(GetTenantBillQuery request, CancellationToken cancellationToken)
{
// 1. 查询账单

View File

@@ -16,6 +16,12 @@ public sealed class MarkTenantAnnouncementReadCommandHandler(
ICurrentUserAccessor? currentUserAccessor = null)
: IRequestHandler<MarkTenantAnnouncementReadCommand, TenantAnnouncementDto?>
{
/// <summary>
/// 标记公告已读。
/// </summary>
/// <param name="request">标记命令。</param>
/// <param name="cancellationToken">取消标记。</param>
/// <returns>公告 DTO 或 null。</returns>
public async Task<TenantAnnouncementDto?> Handle(MarkTenantAnnouncementReadCommand request, CancellationToken cancellationToken)
{
// 1. 查询公告

View File

@@ -12,6 +12,12 @@ namespace TakeoutSaaS.Application.App.Tenants.Handlers;
public sealed class MarkTenantBillingPaidCommandHandler(ITenantBillingRepository billingRepository)
: IRequestHandler<MarkTenantBillingPaidCommand, TenantBillingDto?>
{
/// <summary>
/// 标记账单支付。
/// </summary>
/// <param name="request">标记命令。</param>
/// <param name="cancellationToken">取消标记。</param>
/// <returns>账单 DTO 或 null。</returns>
public async Task<TenantBillingDto?> Handle(MarkTenantBillingPaidCommand request, CancellationToken cancellationToken)
{
// 1. 查询账单

View File

@@ -11,6 +11,12 @@ namespace TakeoutSaaS.Application.App.Tenants.Handlers;
public sealed class MarkTenantNotificationReadCommandHandler(ITenantNotificationRepository notificationRepository)
: IRequestHandler<MarkTenantNotificationReadCommand, TenantNotificationDto?>
{
/// <summary>
/// 标记通知已读。
/// </summary>
/// <param name="request">标记命令。</param>
/// <param name="cancellationToken">取消标记。</param>
/// <returns>通知 DTO 或 null。</returns>
public async Task<TenantNotificationDto?> Handle(MarkTenantNotificationReadCommand request, CancellationToken cancellationToken)
{
// 1. 查询通知

View File

@@ -16,6 +16,12 @@ public sealed class SearchTenantAnnouncementsQueryHandler(
ICurrentUserAccessor? currentUserAccessor = null)
: IRequestHandler<SearchTenantAnnouncementsQuery, PagedResult<TenantAnnouncementDto>>
{
/// <summary>
/// 分页查询公告列表。
/// </summary>
/// <param name="request">查询条件。</param>
/// <param name="cancellationToken">取消标记。</param>
/// <returns>分页结果。</returns>
public async Task<PagedResult<TenantAnnouncementDto>> Handle(SearchTenantAnnouncementsQuery request, CancellationToken cancellationToken)
{
// 1. 过滤有效期条件

View File

@@ -12,6 +12,12 @@ namespace TakeoutSaaS.Application.App.Tenants.Handlers;
public sealed class SearchTenantBillsQueryHandler(ITenantBillingRepository billingRepository)
: IRequestHandler<SearchTenantBillsQuery, PagedResult<TenantBillingDto>>
{
/// <summary>
/// 分页查询账单列表。
/// </summary>
/// <param name="request">查询条件。</param>
/// <param name="cancellationToken">取消标记。</param>
/// <returns>分页结果。</returns>
public async Task<PagedResult<TenantBillingDto>> Handle(SearchTenantBillsQuery request, CancellationToken cancellationToken)
{
// 1. 查询账单

View File

@@ -12,6 +12,12 @@ namespace TakeoutSaaS.Application.App.Tenants.Handlers;
public sealed class SearchTenantNotificationsQueryHandler(ITenantNotificationRepository notificationRepository)
: IRequestHandler<SearchTenantNotificationsQuery, PagedResult<TenantNotificationDto>>
{
/// <summary>
/// 分页查询通知列表。
/// </summary>
/// <param name="request">查询条件。</param>
/// <param name="cancellationToken">取消标记。</param>
/// <returns>分页结果。</returns>
public async Task<PagedResult<TenantNotificationDto>> Handle(SearchTenantNotificationsQuery request, CancellationToken cancellationToken)
{
// 1. 查询通知