From 4eedc195454975c675cbe5a2982c5b5f4f1301f8 Mon Sep 17 00:00:00 2001
From: zhengyuxuan <zhengyuxuan1995>
Date: 星期一, 24 三月 2025 15:43:26 +0800
Subject: [PATCH] fix:bug修复
---
LifePayment/LifePayment.Application/LifePay/LifePayService.cs | 55 +++++++++++++++++++++++++++++++------------------------
1 files changed, 31 insertions(+), 24 deletions(-)
diff --git a/LifePayment/LifePayment.Application/LifePay/LifePayService.cs b/LifePayment/LifePayment.Application/LifePay/LifePayService.cs
index 374d703..64c30f2 100644
--- a/LifePayment/LifePayment.Application/LifePay/LifePayService.cs
+++ b/LifePayment/LifePayment.Application/LifePay/LifePayService.cs
@@ -354,41 +354,37 @@
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
- public async Task<List<LifePayOrderListTemplate>> GetLifePayRefudOrderPageExport(QueryLifePayRefundOrderListInput input)
+ public async Task<List<LifePayRefundOrderListTemplate>> GetLifePayRefudOrderPageExport(QueryLifePayRefundOrderListInput input)
{
-
-
- var result = await (await GetLifePayRefundOrderListFilter(input)).Select(x => new LifePayOrderListTemplate
+ var result = await (await GetLifePayRefundOrderListFilter(input)).Select(x => new LifePayRefundOrderListTemplate
{
- DiscountAmount = x.DiscountAmount,
FinishTime = x.FinishTime,
- LifePayOrderStatus = x.LifePayOrderStatus,
+ RefundPrice = x.RefundPrice,
LifePayOrderType = x.LifePayOrderType,
LifePayType = x.LifePayType,
- OrderNo = x.OrderNo,
PayAmount = x.PayAmount,
PhoneNumber = x.PhoneNumber,
- RechargeAmount = x.RechargeAmount,
- OutOrderNo = x.OutOrderNo,
- PayStatus = x.PayStatus,
- PayTime = x.PayTime,
- ACOOLYOrderNo = x.ACOOLYOrderNo,
+ RefundOrderNo = x.RefundOrderNo,
+ ChannelName = x.ChannelName,
CreationTime = x.CreationTime,
- RefundApplyRemark = x.RefundApplyRemark,
- ChannelName = x.ChannelName
+ ACOOLYStatus = x.ACOOLYStatus,
+ RechargeAmount = x.RechargeAmount,
+ ActualReceivedAmount = x.ActualReceivedAmount.ToString("F2"),
+ LifePayRefundStatus = x.LifePayRefundStatus,
+
}).OrderByDescending(r => r.CreationTime).ToListAsync();
var i = 0;
result.ForEach(s =>
{
s.SerialNumber = ++i;
+ s.ACOOLYStatusStr = s.ACOOLYStatus.GetDescription();
s.LifePayOrderTypeStr = s.LifePayOrderType.GetDescription();
s.CreationTimeStr = s.CreationTime.ToString(LifePaymentConstant.DateTimeFormatStr.yyyyMMddHHmm);
s.RechargeAmountStr = s.RechargeAmount.ToString("F2");
+ s.ActualReceivedAmount = s.ActualReceivedAmount;
+ s.LifePayRefundStatusStr = s.LifePayRefundStatus.GetDescription();
s.PayAmountStr = s.PayAmount.ToString("F2");
- s.PayTimeStr = !s.PayTime.HasValue ? string.Empty : s.PayTime.Value.ToString(LifePaymentConstant.DateTimeFormatStr.yyyyMMddHHmm);
s.LifePayTypeStr = s.LifePayType.GetDescription();
- s.PayStatusStr = s.PayStatus.GetDescription();
- s.LifePayOrderStatusStr = s.LifePayOrderStatus.GetDescription();
s.FinishTimeStr = !s.FinishTime.HasValue ? string.Empty : s.FinishTime.Value.ToString(LifePaymentConstant.DateTimeFormatStr.yyyyMMddHHmm);
});
return result;
@@ -725,11 +721,12 @@
{
DiscountAmount = x.DiscountAmount,
FinishTime = x.FinishTime,
- LifePayOrderStatus = x.LifePayOrderStatus,
+ //LifePayOrderStatus = x.LifePayOrderStatus,
LifePayOrderType = x.LifePayOrderType,
LifePayType = x.LifePayType,
OrderNo = x.OrderNo,
PayAmount = x.PayAmount,
+ ActualRechargeAmount = x.ActualRechargeAmount.HasValue?x.ActualRechargeAmount.Value:0,
PhoneNumber = x.PhoneNumber,
RechargeAmount = x.RechargeAmount,
OutOrderNo = x.OutOrderNo,
@@ -737,8 +734,11 @@
PayTime = x.PayTime,
ACOOLYOrderNo = x.ACOOLYOrderNo,
CreationTime = x.CreationTime,
- RefundApplyRemark = x.RefundApplyRemark,
- ChannelName = x.ChannelName
+ LifePayRefundStatus = x.LifePayRefundStatus,
+ ACOOLYStatus = x.ACOOLYStatus,
+ //RefundApplyRemark = x.RefundApplyRemark,
+ ChannelName = x.ChannelName,
+ PlatformPrice = x.PlatformDeductionAmount.HasValue ? x.PlatformDeductionAmount.Value : 0
}).OrderByDescending(r => r.CreationTime).ToListAsync();
var i = 0;
result.ForEach(s =>
@@ -751,7 +751,10 @@
s.PayTimeStr = !s.PayTime.HasValue ? string.Empty : s.PayTime.Value.ToString(LifePaymentConstant.DateTimeFormatStr.yyyyMMddHHmm);
s.LifePayTypeStr = s.LifePayType.GetDescription();
s.PayStatusStr = s.PayStatus.GetDescription();
- s.LifePayOrderStatusStr = s.LifePayOrderStatus.GetDescription();
+ s.ActualRechargeAmountStr = s.ActualRechargeAmount.ToString("F2");
+ s.LifePayRefundStatusStr = s.LifePayRefundStatusStr.GetDescription();
+ s.ACOOLYStatusStr = s.ACOOLYStatus.GetDescription();
+ //s.LifePayOrderStatusStr = s.LifePayOrderStatus.GetDescription();
s.FinishTimeStr = !s.FinishTime.HasValue ? string.Empty : s.FinishTime.Value.ToString(LifePaymentConstant.DateTimeFormatStr.yyyyMMddHHmm);
});
return result;
@@ -1267,7 +1270,7 @@
/// <param name="orderNo"></param>
/// <param name="outOrderNo"></param>
/// <returns></returns>
- public async Task ACOOLYOrderNotifyHandler(string orderNo, string acoolyOrderNo, LifePayOrderStatusEnum status, ACOOLYStatusEnum acoolyStatus, decimal payAmount)
+ public async Task ACOOLYOrderNotifyHandler(string orderNo, string acoolyOrderNo, LifePayOrderStatusEnum status, ACOOLYStatusEnum acoolyStatus, decimal payAmount,string refundApplyRemark)
{
var order = await _lifePayOrderRepository.Where(x => x.OrderNo == orderNo).FirstOrDefaultAsync();
CheckExtensions.IfTrueThrowUserFriendlyException(order == null, "璁㈠崟涓嶅瓨鍦�");
@@ -1282,7 +1285,10 @@
{
order.ACOOLYOrderNo = acoolyOrderNo;
}
-
+ if (refundApplyRemark.IsNotNullOrEmpty())
+ {
+ order.RefundApplyRemark = refundApplyRemark;
+ }
order.LifePayOrderStatus = status;
order.ACOOLYStatus = acoolyStatus;
@@ -1399,9 +1405,9 @@
&& order.LifePayOrderStatus != LifePayOrderStatusEnum.寰呴��娆� && order.LifePayOrderStatus != LifePayOrderStatusEnum.宸查��娆�)
{
order.LifePayOrderStatus = LifePayOrderStatusEnum.寰呴��娆�;
+ order.LifePayRefundStatus = LifePayRefundStatusEnum.寰呴��娆�;
order.RefundApplyRemark = input.RefundApplyRemark;
order.RefundApplyTime = DateTime.Now;
-
await _lifePayOrderRepository.UpdateAsync(order);
}
else if (order.LifePayOrderStatus == LifePayOrderStatusEnum.寰呴��娆� || order.LifePayRefundStatus == LifePayRefundStatusEnum.寰呴��娆� ||
@@ -2020,6 +2026,7 @@
PlatformDeductionAmount = a.PlatformDeductionAmount,
ACOOLYStatus = a.ACOOLYStatus,
LifePayRefundStatus = a.LifePayRefundStatus,
+ ActualReceivedAmount = a.ActualReceivedAmount.HasValue? a.ActualReceivedAmount.Value : 0
});
return result;
}
--
Gitblit v1.9.1