update
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
namespace FrontOffice.BFF.Application.UserWalletCQ.Commands.WithdrawBalance;
|
||||
public class WithdrawBalanceCommandHandler : IRequestHandler<WithdrawBalanceCommand, WithdrawBalanceResponseDto>
|
||||
public class WithdrawBalanceCommandHandler : IRequestHandler<WithdrawBalanceCommand, Unit>
|
||||
{
|
||||
private readonly IApplicationContractContext _context;
|
||||
|
||||
@@ -8,9 +8,9 @@ public class WithdrawBalanceCommandHandler : IRequestHandler<WithdrawBalanceComm
|
||||
_context = context;
|
||||
}
|
||||
|
||||
public async Task<WithdrawBalanceResponseDto> Handle(WithdrawBalanceCommand request, CancellationToken cancellationToken)
|
||||
public async Task<Unit> Handle(WithdrawBalanceCommand request, CancellationToken cancellationToken)
|
||||
{
|
||||
//TODO: Implement your business logic
|
||||
return new WithdrawBalanceResponseDto();
|
||||
return new Unit();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,26 +1,32 @@
|
||||
using CMSMicroservice.Protobuf.Protos.UserWalletChangeLog;
|
||||
|
||||
namespace FrontOffice.BFF.Application.UserWalletCQ.Queries.GetAllUserWalletChangeLog;
|
||||
public class GetAllUserWalletChangeLogQueryHandler : IRequestHandler<GetAllUserWalletChangeLogQuery, Unit>
|
||||
|
||||
public class
|
||||
GetAllUserWalletChangeLogQueryHandler : IRequestHandler<GetAllUserWalletChangeLogQuery,
|
||||
GetAllUserWalletChangeLogResponseDto>
|
||||
{
|
||||
private readonly IApplicationContractContext _context;
|
||||
private readonly ICurrentUserService _currentUserService;
|
||||
|
||||
public GetAllUserWalletChangeLogQueryHandler(IApplicationContractContext context, ICurrentUserService currentUserService)
|
||||
public GetAllUserWalletChangeLogQueryHandler(IApplicationContractContext context,
|
||||
ICurrentUserService currentUserService)
|
||||
{
|
||||
_context = context;
|
||||
_currentUserService = currentUserService;
|
||||
}
|
||||
|
||||
public async Task<Unit> Handle(GetAllUserWalletChangeLogQuery request, CancellationToken cancellationToken)
|
||||
public async Task<GetAllUserWalletChangeLogResponseDto> Handle(GetAllUserWalletChangeLogQuery request,
|
||||
CancellationToken cancellationToken)
|
||||
{
|
||||
await _context.UserWalletChangeLog.GetAllUserWalletChangeLogByFilterAsync(new GetAllUserWalletChangeLogByFilterRequest()
|
||||
var result = await _context.UserWalletChangeLog.GetAllUserWalletChangeLogByFilterAsync(
|
||||
new GetAllUserWalletChangeLogByFilterRequest()
|
||||
{
|
||||
Filter = new GetAllUserWalletChangeLogByFilterFilter()
|
||||
{
|
||||
UserId = _currentUserService.UserId.Value
|
||||
}
|
||||
}, cancellationToken: cancellationToken);
|
||||
return new Unit();
|
||||
return result.Adapt<GetAllUserWalletChangeLogResponseDto>();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user