feat: add Mapster profiles and enable DiscountOrder handlers
All checks were successful
Build and Deploy / build (push) Successful in 2m14s

This commit is contained in:
masoodafar-web
2025-12-08 21:10:21 +03:30
parent dedc0b809f
commit ce3b5db822
57 changed files with 2125 additions and 374 deletions

View File

@@ -1,5 +1,5 @@
using CMSMicroservice.Protobuf.Protos.Commission;
using Foursat.BackOffice.BFF.Commission.Protos;
namespace BackOffice.BFF.Application.CommissionCQ.Commands.ApproveWithdrawal;

View File

@@ -7,13 +7,18 @@ public record ProcessWithdrawalCommand : IRequest<ProcessWithdrawalResponseDto>
/// </summary>
public long WithdrawalId { get; init; }
/// <summary>
/// تایید یا رد درخواست
/// </summary>
public bool IsApproved { get; init; }
/// <summary>
/// دلیل رد یا یادداشت مدیر (اختیاری)
/// </summary>
public string? Reason { get; init; }
/// <summary>
/// شناسه تراکنش بانکی (اختیاری)
/// </summary>
public string? TransactionId { get; init; }
/// <summary>
/// یادداشت مدیر (اختیاری)
/// </summary>
public string? AdminNote { get; init; }
}

View File

@@ -17,18 +17,20 @@ public class ProcessWithdrawalCommandHandler : IRequestHandler<ProcessWithdrawal
var grpcRequest = new ProcessWithdrawalRequest
{
PayoutId = request.WithdrawalId,
IsApproved = true,
Reason = request.AdminNote != null
? new StringValue { Value = request.AdminNote }
: null
IsApproved = request.IsApproved,
Reason = request.Reason ?? string.Empty
};
await _context.Commissions.ProcessWithdrawalAsync(grpcRequest, cancellationToken: cancellationToken);
var statusMessage = request.IsApproved
? "درخواست برداشت تایید و برای پرداخت ارسال شد"
: "درخواست برداشت رد شد";
return new ProcessWithdrawalResponseDto
{
Success = true,
Message = "درخواست برداشت برای پرداخت ارسال شد"
Message = statusMessage
};
}
}

View File

@@ -1,5 +1,5 @@
using CMSMicroservice.Protobuf.Protos.Commission;
using Foursat.BackOffice.BFF.Commission.Protos;
namespace BackOffice.BFF.Application.CommissionCQ.Commands.RejectWithdrawal;

View File

@@ -1,5 +1,5 @@
using CMSMicroservice.Protobuf.Protos.Commission;
using Foursat.BackOffice.BFF.Commission.Protos;
namespace BackOffice.BFF.Application.CommissionCQ.Commands.TriggerWeeklyCalculation;