Update to support custom rank update interval.

Add support for accurate tenpo score rank.
This commit is contained in:
asesidaa
2023-10-08 02:12:10 +08:00
parent 64da380363
commit 48956e758f
20 changed files with 428 additions and 51 deletions
@@ -63,7 +63,7 @@ public class CardController : BaseController<CardController>
CardRequestType.WriteCard =>
await Mediator.Send(new WriteCardCommand(request.CardId, request.Data)),
CardRequestType.WriteCardDetail => await Mediator.Send(
new WriteCardDetailCommand(request.CardId, request.Data)),
new WriteCardDetailCommand(request.CardId, request.TenpoId, request.Data)),
CardRequestType.WriteCardBData => await Mediator.Send(
new WriteCardBDataCommand(request.CardId, request.Data)),
CardRequestType.WriteAvatar => await Mediator.Send(new WriteAvatarCommand(request.CardId,
@@ -19,12 +19,15 @@ public class RankingController : BaseController<RankingController>
var result = type switch
{
RankingCommandType.GlobalRank => await Mediator.Send(new GetGlobalScoreRankQuery(param)),
RankingCommandType.PlayNumRank => await Mediator.Send(new GetPlayNumRankQuery()),
RankingCommandType.EventRank => await Mediator.Send(new GetEventRankQuery()),
RankingCommandType.MonthlyRank => await Mediator.Send(new GetMonthlyScoreRankQuery()),
RankingCommandType.ShopRank => await Mediator.Send(new GetTenpoScoreRankQuery(tenpoId, param)),
_ => throw new ArgumentOutOfRangeException(nameof(type), type, "Should not happen!")
RankingCommandType.GlobalRank => await Mediator.Send(new GetGlobalScoreRankQuery(param)),
RankingCommandType.PlayNumRank => await Mediator.Send(new GetPlayNumRankQuery()),
RankingCommandType.EventRank => await Mediator.Send(new GetEventRankQuery()),
RankingCommandType.MonthlyRank => await Mediator.Send(new GetMonthlyScoreRankQuery()),
RankingCommandType.ShopRank => await Mediator.Send(new GetTenpoScoreRankQuery(tenpoId, param)),
RankingCommandType.WScoreRank => await Mediator.Send(new GetWScoreRankQuery(param)),
RankingCommandType.WPlayNumRank => await Mediator.Send(new GetWPlayNumRankQuery()),
RankingCommandType.WShopRank => await Mediator.Send(new GetWTenpoScoreRankQuery(tenpoId, param)),
_ => throw new ArgumentOutOfRangeException(nameof(type), type, "Should not happen!")
};
if (result.Succeeded)