From 8dd294b46213917661aa9d580289a973eb614e67 Mon Sep 17 00:00:00 2001
From: zhengyuxuan <zhengyuxuan1995>
Date: 星期二, 25 三月 2025 10:16:29 +0800
Subject: [PATCH] fix:退款驳回
---
LifePayment/LifePayment.Host/LifePaymentServices.Application.Contracts.xml | 5 +++++
LifePayment/LifePayment.Application/LifePay/LifePayService.cs | 32 +++++++++++++++++++++++++-------
2 files changed, 30 insertions(+), 7 deletions(-)
diff --git a/LifePayment/LifePayment.Application/LifePay/LifePayService.cs b/LifePayment/LifePayment.Application/LifePay/LifePayService.cs
index 8b3f7e1..25934f7 100644
--- a/LifePayment/LifePayment.Application/LifePay/LifePayService.cs
+++ b/LifePayment/LifePayment.Application/LifePay/LifePayService.cs
@@ -834,6 +834,8 @@
var rate = await GetRate();
CheckExtensions.IfTrueThrowUserFriendlyException(rate.IsNullOrEmpty(), "鏈厤缃姌鎵�");
+
+
var amount = CalculateAmount(input.ProductData.ParValue, rate.FirstOrDefault(x => x.RateType == LifePayRateTypeEnum.榛樿璇濊垂鎶樻墸).Rate);
var platformRate = await _lifePayRateRepository.FirstOrDefaultAsync(r => r.RateType == LifePayRateTypeEnum.渚涘簲鍟嗘姌鎵d环);
@@ -1566,24 +1568,21 @@
var order = await _lifePayOrderRepository.FirstOrDefaultAsync(x => x.Id == input.Id);
CheckExtensions.IfTrueThrowUserFriendlyException(order == null, "璁㈠崟涓嶅瓨鍦�");
- if(order.LifePayRefundStatus == LifePayRefundStatusEnum.宸查��娆�)
+ if (order.LifePayRefundStatus == LifePayRefundStatusEnum.宸查��娆�)
{
return;
}
- if (order.LifePayOrderStatus == LifePayOrderStatusEnum.寰呴��娆�)
+ if (order.LifePayOrderStatus == LifePayOrderStatusEnum.寰呴��娆� || order.LifePayRefundStatus == LifePayRefundStatusEnum.寰呴��娆�)
{
- if (order.ACOOLYStatus == ACOOLYStatusEnum.宸插畬鎴� || order.ACOOLYStatus == ACOOLYStatusEnum.閮ㄥ垎鍏呭�兼垚鍔�)
+ if (order.ACOOLYStatus == ACOOLYStatusEnum.宸插畬鎴� || order.ACOOLYStatus == ACOOLYStatusEnum.鍏呭�兼垚鍔� || order.ACOOLYStatus == ACOOLYStatusEnum.閮ㄥ垎鍏呭�兼垚鍔�)
{
order.LifePayOrderStatus = LifePayOrderStatusEnum.宸插畬鎴�;
- }
- else if (order.ACOOLYStatus == ACOOLYStatusEnum.鍏呭�煎け璐�)
- {
- order.LifePayOrderStatus = LifePayOrderStatusEnum.閫�娆惧け璐�;
}
order.RefundCheckRemark = input.RefundCheckRemark;
order.RefundCheckUserId = CurrentUser.Id;
+ order.LifePayRefundStatus = LifePayRefundStatusEnum.鏃犻渶閫�娆�;
await _lifePayOrderRepository.UpdateAsync(order);
@@ -2101,5 +2100,24 @@
};
}
+ public async Task<decimal> GetLifePayRate(string channelId, LifePayRateTypeEnum lifePayRateType)
+ {
+ if (string.IsNullOrEmpty(channelId))
+ {
+ var rate = await GetRate();
+ CheckExtensions.IfTrueThrowUserFriendlyException(rate.IsNullOrEmpty(), "鏈厤缃姌鎵�");
+ var result = rate.FirstOrDefault(x => x.RateType == lifePayRateType).Rate;
+ return result;
+ }
+ else
+ {
+ //var channel = await _lifePayChannlesRep.Where(x => x.ChannlesNum == channelId);
+
+ return 0;
+ }
+
+
+ }
+
#endregion
}
diff --git a/LifePayment/LifePayment.Host/LifePaymentServices.Application.Contracts.xml b/LifePayment/LifePayment.Host/LifePaymentServices.Application.Contracts.xml
index e45398d..46b2f78 100644
--- a/LifePayment/LifePayment.Host/LifePaymentServices.Application.Contracts.xml
+++ b/LifePayment/LifePayment.Host/LifePaymentServices.Application.Contracts.xml
@@ -1041,6 +1041,11 @@
閫�娆炬椂闂�
</summary>
</member>
+ <member name="P:LifePayment.Application.Contracts.UserLifePayOrderOutput.RefundApplyTime">
+ <summary>
+ 閫�娆剧敵璇锋椂闂�
+ </summary>
+ </member>
<member name="P:LifePayment.Application.Contracts.UserLifePayOrderOutput.RefundCredentialsImgUrl">
<summary>
閫�娆惧嚟璇�
--
Gitblit v1.9.1