using Fengling.Member.Application.Commands.Points; using Fengling.Member.Application.Dtos; using Fengling.Member.Application.Services; using MediatR; namespace Fengling.Member.Application.Commands.Points; public class CalculatePointsCommandHandler : IRequestHandler { private readonly PointsRuleMatcher _matcher; public CalculatePointsCommandHandler(PointsRuleMatcher matcher) { _matcher = matcher; } public async Task Handle(CalculatePointsCommand request, CancellationToken cancellationToken) { return await _matcher.CalculatePointsAsync(request.CodeInfo); } }