diff --git a/src/FrontOffice.BFF.Application/UserWalletCQ/Commands/WithdrawBalance/WithdrawBalanceCommandHandler.cs b/src/FrontOffice.BFF.Application/UserWalletCQ/Commands/WithdrawBalance/WithdrawBalanceCommandHandler.cs index e6351cf..773f976 100644 --- a/src/FrontOffice.BFF.Application/UserWalletCQ/Commands/WithdrawBalance/WithdrawBalanceCommandHandler.cs +++ b/src/FrontOffice.BFF.Application/UserWalletCQ/Commands/WithdrawBalance/WithdrawBalanceCommandHandler.cs @@ -1,5 +1,5 @@ namespace FrontOffice.BFF.Application.UserWalletCQ.Commands.WithdrawBalance; -public class WithdrawBalanceCommandHandler : IRequestHandler +public class WithdrawBalanceCommandHandler : IRequestHandler { private readonly IApplicationContractContext _context; @@ -8,9 +8,9 @@ public class WithdrawBalanceCommandHandler : IRequestHandler Handle(WithdrawBalanceCommand request, CancellationToken cancellationToken) + public async Task Handle(WithdrawBalanceCommand request, CancellationToken cancellationToken) { //TODO: Implement your business logic - return new WithdrawBalanceResponseDto(); + return new Unit(); } } diff --git a/src/FrontOffice.BFF.Application/UserWalletCQ/Queries/GetAllUserWalletChangeLog/GetAllUserWalletChangeLogQueryHandler.cs b/src/FrontOffice.BFF.Application/UserWalletCQ/Queries/GetAllUserWalletChangeLog/GetAllUserWalletChangeLogQueryHandler.cs index ba74da6..b9bbc11 100644 --- a/src/FrontOffice.BFF.Application/UserWalletCQ/Queries/GetAllUserWalletChangeLog/GetAllUserWalletChangeLogQueryHandler.cs +++ b/src/FrontOffice.BFF.Application/UserWalletCQ/Queries/GetAllUserWalletChangeLog/GetAllUserWalletChangeLogQueryHandler.cs @@ -1,26 +1,32 @@ using CMSMicroservice.Protobuf.Protos.UserWalletChangeLog; namespace FrontOffice.BFF.Application.UserWalletCQ.Queries.GetAllUserWalletChangeLog; -public class GetAllUserWalletChangeLogQueryHandler : IRequestHandler + +public class + GetAllUserWalletChangeLogQueryHandler : IRequestHandler { 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 Handle(GetAllUserWalletChangeLogQuery request, CancellationToken cancellationToken) + public async Task 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(); } -} +} \ No newline at end of file diff --git a/src/FrontOffice.BFF.WebApi/Services/UserWalletService.cs b/src/FrontOffice.BFF.WebApi/Services/UserWalletService.cs index 3152b82..6856979 100644 --- a/src/FrontOffice.BFF.WebApi/Services/UserWalletService.cs +++ b/src/FrontOffice.BFF.WebApi/Services/UserWalletService.cs @@ -1,9 +1,10 @@ -using FrontOffice.BFF.Protobuf.Protos.UserWallet; using FrontOffice.BFF.WebApi.Common.Services; using FrontOffice.BFF.Application.UserWalletCQ.Queries.GetAllUserWalletChangeLog; using FrontOffice.BFF.Application.UserWalletCQ.Queries.GetUserWallet; using FrontOffice.BFF.Application.UserWalletCQ.Commands.TransferUserWalletBallance; using FrontOffice.BFF.Application.UserWalletCQ.Commands.WithdrawBalance; +using FrontOffice.BFF.UserWallet.Protobuf.Protos.UserWallet; + namespace FrontOffice.BFF.WebApi.Services; public class UserWalletService : UserWalletContract.UserWalletContractBase { diff --git a/src/Protobufs/FrontOffice.BFF.UserOrder.Protobuf/FrontOffice.BFF.UserOrder.Protobuf.csproj b/src/Protobufs/FrontOffice.BFF.UserOrder.Protobuf/FrontOffice.BFF.UserOrder.Protobuf.csproj index 4923449..140e62e 100644 --- a/src/Protobufs/FrontOffice.BFF.UserOrder.Protobuf/FrontOffice.BFF.UserOrder.Protobuf.csproj +++ b/src/Protobufs/FrontOffice.BFF.UserOrder.Protobuf/FrontOffice.BFF.UserOrder.Protobuf.csproj @@ -4,7 +4,7 @@ net9.0 enable enable - 0.0.112 + 0.0.113 None False False