feat: Implement Cancel Order functionality with command, handler, and validation

This commit is contained in:
masoodafar-web
2025-12-04 19:53:21 +03:30
parent 82319285bc
commit 67b43fea7a
12 changed files with 245 additions and 1 deletions

View File

@@ -21,4 +21,9 @@ public record GetWithdrawalRequestsQuery : IRequest<GetWithdrawalRequestsRespons
/// فیلتر شناسه کاربر (اختیاری)
/// </summary>
public long? UserId { get; init; }
/// <summary>
/// فیلتر شماره شبا / IBAN (اختیاری)
/// </summary>
public string? IbanNumber { get; init; }
}

View File

@@ -29,6 +29,11 @@ public class GetWithdrawalRequestsQueryHandler : IRequestHandler<GetWithdrawalRe
grpcRequest.UserId = request.UserId.Value;
}
if (!string.IsNullOrWhiteSpace(request.IbanNumber))
{
grpcRequest.IbanNumber = request.IbanNumber;
}
var response = await _context.Commissions.GetWithdrawalRequestsAsync(grpcRequest, cancellationToken: cancellationToken);
return response.Adapt<GetWithdrawalRequestsResponseDto>();
}

View File

@@ -17,6 +17,9 @@ public record WithdrawalRequestDto
public string Method { get; init; } = "Bank";
public string? BankAccount { get; init; }
public string? BankName { get; init; }
public string? BankReferenceId { get; init; }
public string? BankTrackingCode { get; init; }
public string? PaymentFailureReason { get; init; }
public DateTime RequestDate { get; init; }
public DateTime? ProcessedDate { get; init; }
public string? AdminNote { get; init; }