feat: 租户账单公告通知接口
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
using MediatR;
|
||||
using TakeoutSaaS.Application.App.Tenants.Dto;
|
||||
using TakeoutSaaS.Application.App.Tenants.Queries;
|
||||
using TakeoutSaaS.Domain.Tenants.Repositories;
|
||||
|
||||
namespace TakeoutSaaS.Application.App.Tenants.Handlers;
|
||||
|
||||
/// <summary>
|
||||
/// 账单详情查询处理器。
|
||||
/// </summary>
|
||||
public sealed class GetTenantBillQueryHandler(ITenantBillingRepository billingRepository)
|
||||
: IRequestHandler<GetTenantBillQuery, TenantBillingDto?>
|
||||
{
|
||||
public async Task<TenantBillingDto?> Handle(GetTenantBillQuery request, CancellationToken cancellationToken)
|
||||
{
|
||||
var bill = await billingRepository.FindByIdAsync(request.TenantId, request.BillingId, cancellationToken);
|
||||
return bill?.ToDto();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user