This commit is contained in:
+4
-3
@@ -38,7 +38,7 @@ public class GetUserPayoutsQueryHandler : IRequestHandler<GetUserPayoutsQuery, G
|
||||
cmsRequest,
|
||||
cancellationToken: cancellationToken);
|
||||
|
||||
return new GetUserPayoutsResponseDto
|
||||
var x= new GetUserPayoutsResponseDto
|
||||
{
|
||||
MetaData = new MetaData
|
||||
{
|
||||
@@ -53,15 +53,16 @@ public class GetUserPayoutsQueryHandler : IRequestHandler<GetUserPayoutsQuery, G
|
||||
UserId = m.UserId,
|
||||
UserName = m.UserName,
|
||||
WeekNumber = m.WeekNumber,
|
||||
BalancesEarned = m.BalancesEarned,
|
||||
BalancesEarned = (int)m.BalancesEarned,
|
||||
ValuePerBalance = m.ValuePerBalance,
|
||||
TotalAmount = m.TotalAmount,
|
||||
Status = m.Status,
|
||||
WithdrawalMethod = m.WithdrawalMethod,
|
||||
IbanNumber = m.IbanNumber,
|
||||
Created = m.Created!=null?m.Created.ToDateTime():DateTime.Now,
|
||||
LastModified = m.LastModified?.ToDateTime()
|
||||
// LastModified = m.LastModified?.ToDateTime()
|
||||
}).ToList()
|
||||
};
|
||||
return x;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,5 +17,7 @@ public class CommissionProfile : IRegister
|
||||
.Map(dest => dest.TotalBalances, src => src.TotalBalances)
|
||||
.Map(dest => dest.Created, src => src.Created.ToDateTimeOffset())
|
||||
;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Afrino.FMSMicroservice.Protobuf" Version="0.0.122" />
|
||||
<PackageReference Include="Foursat.CMSMicroservice.Protobuf" Version="0.0.149" />
|
||||
<PackageReference Include="Foursat.CMSMicroservice.Protobuf" Version="0.0.152" />
|
||||
|
||||
<PackageReference Include="Google.Protobuf" Version="3.23.3" />
|
||||
<PackageReference Include="Grpc.Net.ClientFactory" Version="2.54.0" />
|
||||
|
||||
@@ -51,34 +51,34 @@ public class CommissionProfile : IRegister
|
||||
});
|
||||
|
||||
// GetUserPayoutsResponseDto -> GetUserCommissionPayoutsResponse
|
||||
config.NewConfig<GetUserPayoutsResponseDto, GetUserCommissionPayoutsResponse>()
|
||||
.MapWith(src => new GetUserCommissionPayoutsResponse
|
||||
{
|
||||
MetaData = new BackOffice.BFF.Protobuf.Common.MetaData
|
||||
{
|
||||
CurrentPage = src.MetaData.CurrentPage,
|
||||
PageSize = src.MetaData.PageSize,
|
||||
TotalCount = src.MetaData.TotalCount,
|
||||
TotalPage = src.MetaData.TotalPage
|
||||
},
|
||||
Models = { (src.Models ?? new List<GetUserPayoutsResponseModel>()).Select(m => new UserCommissionPayoutModel
|
||||
{
|
||||
Id = m.Id,
|
||||
UserId = m.UserId,
|
||||
UserName = m.UserName,
|
||||
WeekNumber = m.WeekNumber,
|
||||
BalancesEarned = m.BalancesEarned,
|
||||
ValuePerBalance = m.ValuePerBalance,
|
||||
TotalAmount = m.TotalAmount,
|
||||
Status = m.Status,
|
||||
WithdrawalMethod = m.WithdrawalMethod,
|
||||
IbanNumber = m.IbanNumber,
|
||||
Created = Timestamp.FromDateTime(DateTime.SpecifyKind(m.Created, DateTimeKind.Utc)),
|
||||
LastModified = m.LastModified.HasValue
|
||||
? Timestamp.FromDateTime(DateTime.SpecifyKind(m.LastModified.Value, DateTimeKind.Utc))
|
||||
: null
|
||||
}) }
|
||||
});
|
||||
// config.NewConfig<GetUserPayoutsResponseDto, GetUserCommissionPayoutsResponse>()
|
||||
// .MapWith(src => new GetUserCommissionPayoutsResponse
|
||||
// {
|
||||
// MetaData = new BackOffice.BFF.Protobuf.Common.MetaData
|
||||
// {
|
||||
// CurrentPage = src.MetaData.CurrentPage,
|
||||
// PageSize = src.MetaData.PageSize,
|
||||
// TotalCount = src.MetaData.TotalCount,
|
||||
// TotalPage = src.MetaData.TotalPage
|
||||
// },
|
||||
// Models = { (src.Models ?? new List<GetUserPayoutsResponseModel>()).Select(m => new UserCommissionPayoutModel
|
||||
// {
|
||||
// Id = m.Id,
|
||||
// UserId = m.UserId,
|
||||
// UserName = m.UserName,
|
||||
// WeekNumber = m.WeekNumber,
|
||||
// BalancesEarned = m.BalancesEarned,
|
||||
// ValuePerBalance = m.ValuePerBalance,
|
||||
// TotalAmount = m.TotalAmount,
|
||||
// Status = m.Status,
|
||||
// WithdrawalMethod = m.WithdrawalMethod,
|
||||
// IbanNumber = m.IbanNumber,
|
||||
// Created = Timestamp.FromDateTime(DateTime.SpecifyKind(m.Created, DateTimeKind.Utc)),
|
||||
// LastModified = m.LastModified.HasValue
|
||||
// ? Timestamp.FromDateTime(DateTime.SpecifyKind(m.LastModified.Value, DateTimeKind.Utc))
|
||||
// : null
|
||||
// }) }
|
||||
// });
|
||||
|
||||
// GetAllWeeklyPoolsResponseDto -> GetAllWeeklyPoolsResponse
|
||||
config.NewConfig<GetAllWeeklyPoolsResponseDto, GetAllWeeklyPoolsResponse>()
|
||||
|
||||
Reference in New Issue
Block a user