Generator Changes at 11/25/2025 2:22:16 AM +03:30
This commit is contained in:
@@ -10,7 +10,7 @@ public class GeneralMapping : IRegister
|
||||
|
||||
config.NewConfig<decimal, string>()
|
||||
.MapWith(src => src.ToString("R", new CultureInfo("en-us")));
|
||||
|
||||
|
||||
config.NewConfig<decimal?, string>()
|
||||
.MapWith(src => src == null ? string.Empty : src.Value.ToString("R", new CultureInfo("en-us")));
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
namespace FrontOffice.BFF.WebApi.Common.Mappings;
|
||||
|
||||
public class UserWalletProfile : IRegister
|
||||
{
|
||||
void IRegister.Register(TypeAdapterConfig config)
|
||||
{
|
||||
//config.NewConfig<Source,Destination>()
|
||||
// .Map(dest => dest.FullName, src => $"{src.Firstname} {src.Lastname}");
|
||||
}
|
||||
}
|
||||
32
src/FrontOffice.BFF.WebApi/Services/UserWalletService.cs
Normal file
32
src/FrontOffice.BFF.WebApi/Services/UserWalletService.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
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;
|
||||
namespace FrontOffice.BFF.WebApi.Services;
|
||||
public class UserWalletService : UserWalletContract.UserWalletContractBase
|
||||
{
|
||||
private readonly IDispatchRequestToCQRS _dispatchRequestToCQRS;
|
||||
|
||||
public UserWalletService(IDispatchRequestToCQRS dispatchRequestToCQRS)
|
||||
{
|
||||
_dispatchRequestToCQRS = dispatchRequestToCQRS;
|
||||
}
|
||||
public override async Task<Empty> GetAllUserWalletChangeLog(Empty request, ServerCallContext context)
|
||||
{
|
||||
return await _dispatchRequestToCQRS.Handle<GetAllUserWalletChangeLogQuery, Empty>(context);
|
||||
}
|
||||
public override async Task<GetUserWalletResponse> GetUserWallet(Empty request, ServerCallContext context)
|
||||
{
|
||||
return await _dispatchRequestToCQRS.Handle<GetUserWalletQuery, GetUserWalletResponse>(context);
|
||||
}
|
||||
public override async Task<Empty> TransferUserWalletBallance(Empty request, ServerCallContext context)
|
||||
{
|
||||
return await _dispatchRequestToCQRS.Handle<TransferUserWalletBallanceCommand, Empty>(context);
|
||||
}
|
||||
public override async Task<GetAllUserWalletChangeLogResponse> WithdrawBalance(Empty request, ServerCallContext context)
|
||||
{
|
||||
return await _dispatchRequestToCQRS.Handle<WithdrawBalanceCommand, GetAllUserWalletChangeLogResponse>(context);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user