1
0
mirror of synced 2025-02-15 02:02:38 +01:00

27 lines
785 B
C#
Raw Normal View History

namespace Application.Game.Card.Read;
public record ReadTotalTrophyQuery(long CardId) : IRequestWrapper<string>;
2023-02-17 00:38:01 +08:00
public class ReadTotalTrophyQueryHandler : RequestHandlerBase<ReadTotalTrophyQuery, string>
{
2023-02-14 00:38:19 +08:00
private const string TOTAL_TROPHY_XPATH = "/root/total_trophy";
public ReadTotalTrophyQueryHandler(ICardDependencyAggregate aggregate) : base(aggregate)
{
}
public override Task<ServiceResult<string>> Handle(ReadTotalTrophyQuery request, CancellationToken cancellationToken)
{
2023-02-14 00:38:19 +08:00
var trophy = new TotalTrophyDto
{
CardId = request.CardId,
TrophyNum = 8
};
var result = trophy.SerializeCardData(TOTAL_TROPHY_XPATH);
return Task.FromResult(new ServiceResult<string>(result));
}
}