fix: update commission payout mapping and handle null Created date
Build and Deploy / build (push) Successful in 2m30s
Build and Deploy / build (push) Successful in 2m30s
This commit is contained in:
@@ -12,6 +12,27 @@ public class CommissionProfile : IRegister
|
||||
{
|
||||
void IRegister.Register(TypeAdapterConfig config)
|
||||
{
|
||||
// GetUserCommissionPayoutsRequest -> GetUserPayoutsQuery
|
||||
config.NewConfig<GetUserCommissionPayoutsRequest, GetUserPayoutsQuery>()
|
||||
.MapWith(src => new GetUserPayoutsQuery
|
||||
{
|
||||
PaginationState = src.PaginationState != null
|
||||
? new BackOffice.BFF.Application.Common.Models.PaginationState
|
||||
{
|
||||
PageNumber = src.PaginationState.PageNumber,
|
||||
PageSize = src.PaginationState.PageSize
|
||||
}
|
||||
: null,
|
||||
Filter = src.Filter != null
|
||||
? new BackOffice.BFF.Application.CommissionCQ.Queries.GetUserPayouts.GetUserPayoutsFilter
|
||||
{
|
||||
UserId = src.Filter.UserId,
|
||||
WeekNumber = src.Filter.WeekNumber,
|
||||
Status = src.Filter.Status
|
||||
}
|
||||
: null
|
||||
});
|
||||
|
||||
// GetWeeklyPoolResponseDto -> GetWeeklyCommissionPoolResponse
|
||||
config.NewConfig<GetWeeklyPoolResponseDto, GetWeeklyCommissionPoolResponse>()
|
||||
.MapWith(src => new GetWeeklyCommissionPoolResponse
|
||||
|
||||
Reference in New Issue
Block a user