feat: Add GetClubStatistics and GetNetworkStatistics APIs with corresponding request and response messages
This commit is contained in:
@@ -5,10 +5,17 @@ using CMSMicroservice.Application.CommissionCQ.Commands.CalculateWeeklyCommissio
|
||||
using CMSMicroservice.Application.CommissionCQ.Commands.ProcessUserPayouts;
|
||||
using CMSMicroservice.Application.CommissionCQ.Commands.RequestWithdrawal;
|
||||
using CMSMicroservice.Application.CommissionCQ.Commands.ProcessWithdrawal;
|
||||
using CMSMicroservice.Application.CommissionCQ.Commands.ApproveWithdrawal;
|
||||
using CMSMicroservice.Application.CommissionCQ.Commands.RejectWithdrawal;
|
||||
using CMSMicroservice.Application.CommissionCQ.Commands.TriggerWeeklyCalculation;
|
||||
using CMSMicroservice.Application.CommissionCQ.Queries.GetWeeklyCommissionPool;
|
||||
using CMSMicroservice.Application.CommissionCQ.Queries.GetUserCommissionPayouts;
|
||||
using CMSMicroservice.Application.CommissionCQ.Queries.GetCommissionPayoutHistory;
|
||||
using CMSMicroservice.Application.CommissionCQ.Queries.GetUserWeeklyBalances;
|
||||
using CMSMicroservice.Application.CommissionCQ.Queries.GetAllWeeklyPools;
|
||||
using CMSMicroservice.Application.CommissionCQ.Queries.GetWithdrawalRequests;
|
||||
using CMSMicroservice.Application.CommissionCQ.Queries.GetWorkerStatus;
|
||||
using CMSMicroservice.Application.CommissionCQ.Queries.GetWorkerExecutionLogs;
|
||||
|
||||
namespace CMSMicroservice.WebApi.Services;
|
||||
|
||||
@@ -67,4 +74,40 @@ public class CommissionService : CommissionContract.CommissionContractBase
|
||||
{
|
||||
return await _dispatchRequestToCQRS.Handle<GetUserWeeklyBalancesRequest, GetUserWeeklyBalancesQuery, GetUserWeeklyBalancesResponse>(request, context);
|
||||
}
|
||||
|
||||
public override async Task<GetAllWeeklyPoolsResponse> GetAllWeeklyPools(GetAllWeeklyPoolsRequest request, ServerCallContext context)
|
||||
{
|
||||
return await _dispatchRequestToCQRS.Handle<GetAllWeeklyPoolsRequest, GetAllWeeklyPoolsQuery, GetAllWeeklyPoolsResponse>(request, context);
|
||||
}
|
||||
|
||||
public override async Task<GetWithdrawalRequestsResponse> GetWithdrawalRequests(GetWithdrawalRequestsRequest request, ServerCallContext context)
|
||||
{
|
||||
return await _dispatchRequestToCQRS.Handle<GetWithdrawalRequestsRequest, GetWithdrawalRequestsQuery, GetWithdrawalRequestsResponse>(request, context);
|
||||
}
|
||||
|
||||
public override async Task<Empty> ApproveWithdrawal(ApproveWithdrawalRequest request, ServerCallContext context)
|
||||
{
|
||||
return await _dispatchRequestToCQRS.Handle<ApproveWithdrawalRequest, ApproveWithdrawalCommand>(request, context);
|
||||
}
|
||||
|
||||
public override async Task<Empty> RejectWithdrawal(RejectWithdrawalRequest request, ServerCallContext context)
|
||||
{
|
||||
return await _dispatchRequestToCQRS.Handle<RejectWithdrawalRequest, RejectWithdrawalCommand>(request, context);
|
||||
}
|
||||
|
||||
// Worker Control APIs
|
||||
public override async Task<TriggerWeeklyCalculationResponse> TriggerWeeklyCalculation(TriggerWeeklyCalculationRequest request, ServerCallContext context)
|
||||
{
|
||||
return await _dispatchRequestToCQRS.Handle<TriggerWeeklyCalculationRequest, TriggerWeeklyCalculationCommand, TriggerWeeklyCalculationResponse>(request, context);
|
||||
}
|
||||
|
||||
public override async Task<GetWorkerStatusResponse> GetWorkerStatus(GetWorkerStatusRequest request, ServerCallContext context)
|
||||
{
|
||||
return await _dispatchRequestToCQRS.Handle<GetWorkerStatusRequest, GetWorkerStatusQuery, GetWorkerStatusResponse>(request, context);
|
||||
}
|
||||
|
||||
public override async Task<GetWorkerExecutionLogsResponse> GetWorkerExecutionLogs(GetWorkerExecutionLogsRequest request, ServerCallContext context)
|
||||
{
|
||||
return await _dispatchRequestToCQRS.Handle<GetWorkerExecutionLogsRequest, GetWorkerExecutionLogsQuery, GetWorkerExecutionLogsResponse>(request, context);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user