From 2e7a604adf53608a65d5f04c79b28a521667ef75 Mon Sep 17 00:00:00 2001
From: zhengyuxuan <zhengyuxuan1995>
Date: 星期五, 21 三月 2025 16:26:47 +0800
Subject: [PATCH] fix:bug修复
---
LifePayment/LifePayment.Application.Contracts/LifePay/LifePayOutput.cs | 2 +-
LifePayment/LifePayment.Domain/LifePay/LifePayOrder.cs | 2 +-
LifePayment/LifePayment.Application/LifePay/LifePayService.cs | 6 +++---
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/LifePayment/LifePayment.Application.Contracts/LifePay/LifePayOutput.cs b/LifePayment/LifePayment.Application.Contracts/LifePay/LifePayOutput.cs
index cb59958..88dfae2 100644
--- a/LifePayment/LifePayment.Application.Contracts/LifePay/LifePayOutput.cs
+++ b/LifePayment/LifePayment.Application.Contracts/LifePay/LifePayOutput.cs
@@ -620,7 +620,7 @@
/// <summary>
/// 鎵嬬画璐规瘮渚�
/// </summary>
- public decimal PremiumRate { get; set; }
+ public decimal? PremiumRate { get; set; }
/// <summary>
/// 鎵嬬画璐�
diff --git a/LifePayment/LifePayment.Application/LifePay/LifePayService.cs b/LifePayment/LifePayment.Application/LifePay/LifePayService.cs
index 2b08ff7..65a57b4 100644
--- a/LifePayment/LifePayment.Application/LifePay/LifePayService.cs
+++ b/LifePayment/LifePayment.Application/LifePay/LifePayService.cs
@@ -382,8 +382,8 @@
ChannlesRakeRate = channle.ChannlesRakeRate,
ChannlesRakePrice = channlesRakePrice.HasValue ? 0 : Math.Round(channlesRakePrice.Value, 2),
PremiumRate = order.PremiumRate,
- PremiumPrice = Math.Round(order.PayAmount * order.PremiumRate, 2),
- Profit = (order.PayAmount - order.PlatformDeductionAmount) * (1.00m - channle.ChannlesRakeRate / 100) - Math.Round(order.PayAmount * order.PremiumRate, 2)
+ PremiumPrice = Math.Round(order.PayAmount * (order.PremiumRate.HasValue ? order.PremiumRate.Value:0), 2),
+ Profit = (order.PayAmount - order.PlatformDeductionAmount) * (1.00m - channle.ChannlesRakeRate / 100) - Math.Round(order.PayAmount * (order.PremiumRate.HasValue ? order.PremiumRate.Value : 0), 2)
};
return result;
@@ -1230,7 +1230,7 @@
order.FinishTime = DateTime.Now;
}
- if (order.LifePayOrderStatus == LifePayOrderStatusEnum.宸插け璐� && order.PayStatus != LifePayStatusEnum.宸查��娆�)
+ if (order.LifePayOrderStatus == LifePayOrderStatusEnum.宸插け璐� && order.LifePayRefundStatus != LifePayRefundStatusEnum.宸查��娆�)
{
order.LifePayRefundStatus = LifePayRefundStatusEnum.寰呴��娆�;
}
diff --git a/LifePayment/LifePayment.Domain/LifePay/LifePayOrder.cs b/LifePayment/LifePayment.Domain/LifePay/LifePayOrder.cs
index d36b20e..01146f6 100644
--- a/LifePayment/LifePayment.Domain/LifePay/LifePayOrder.cs
+++ b/LifePayment/LifePayment.Domain/LifePay/LifePayOrder.cs
@@ -186,7 +186,7 @@
/// <summary>
/// 鎵嬬画璐规瘮渚�
/// </summary>
- public decimal PremiumRate { get; set; }
+ public decimal? PremiumRate { get; set; }
}
}
\ No newline at end of file
--
Gitblit v1.9.1