feat: add Mapster profiles and enable DiscountOrder handlers
All checks were successful
Build and Deploy / build (push) Successful in 2m14s
All checks were successful
Build and Deploy / build (push) Successful in 2m14s
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
|
||||
using CMSMicroservice.Protobuf.Protos.Commission;
|
||||
using Foursat.BackOffice.BFF.Commission.Protos;
|
||||
|
||||
namespace BackOffice.BFF.Application.CommissionCQ.Commands.ApproveWithdrawal;
|
||||
|
||||
|
||||
@@ -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; }
|
||||
}
|
||||
|
||||
@@ -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
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
using CMSMicroservice.Protobuf.Protos.Commission;
|
||||
using Foursat.BackOffice.BFF.Commission.Protos;
|
||||
|
||||
namespace BackOffice.BFF.Application.CommissionCQ.Commands.RejectWithdrawal;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
using CMSMicroservice.Protobuf.Protos.Commission;
|
||||
using Foursat.BackOffice.BFF.Commission.Protos;
|
||||
|
||||
namespace BackOffice.BFF.Application.CommissionCQ.Commands.TriggerWeeklyCalculation;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user