From 08371f70becf10a003005b79a33fc393ba4efaf3 Mon Sep 17 00:00:00 2001
From: sunpengfei <i@angelzzz.com>
Date: 星期二, 10 六月 2025 11:14:06 +0800
Subject: [PATCH] feat:渠道订单导出接口实现

---
 LifePayment/LifePayment.Application/LifePay/LifePayService.cs |   46 ++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 46 insertions(+), 0 deletions(-)

diff --git a/LifePayment/LifePayment.Application/LifePay/LifePayService.cs b/LifePayment/LifePayment.Application/LifePay/LifePayService.cs
index 69f1df1..6a80847 100644
--- a/LifePayment/LifePayment.Application/LifePay/LifePayService.cs
+++ b/LifePayment/LifePayment.Application/LifePay/LifePayService.cs
@@ -788,6 +788,52 @@
         });
         return result;
     }
+
+    public async Task<List<LifePayOrderListTemplateForChannle>> GetLifePayOrderPageExportForChannle(QueryLifePayOrderListInput input)
+    {
+        var result = await (await GetLifePayOrderListFilter(input)).Select(x => new LifePayOrderListTemplateForChannle
+        {
+            DiscountAmount = x.DiscountAmount,
+            FinishTime = x.FinishTime,
+            LifePayOrderStatus = x.LifePayOrderStatus,
+            LifePayOrderType = x.LifePayOrderType,
+            LifePayType = x.LifePayType,
+            OrderNo = x.OrderNo,
+            PayAmount = x.PayAmount,
+            ActualRechargeAmount = x.RechargeAmount,
+            PhoneNumber = x.PhoneNumber,
+            RechargeAmount = x.RechargeAmount,
+            OutOrderNo = x.OutOrderNo,
+            PayStatus = x.PayStatus,
+            PayTime = x.PayTime,
+            ACOOLYOrderNo = x.ACOOLYOrderNo,
+            CreationTime = x.CreationTime,
+            LifePayRefundStatus = x.LifePayRefundStatus,
+            ACOOLYStatus = x.ACOOLYStatus,
+            //RefundApplyRemark = x.RefundApplyRemark,
+            ChannelName = x.ChannelName,
+            PlatformPrice = x.PlatformDeductionAmount.HasValue ? x.PlatformDeductionAmount.Value : 0.00m
+        }).OrderByDescending(r => r.CreationTime).ToListAsync();
+        var i = 0;
+        result.ForEach(s =>
+        {
+            s.SerialNumber = ++i;
+            s.LifePayOrderTypeStr = s.LifePayOrderType.GetDescription();
+            s.CreationTimeStr = s.CreationTime.ToString(LifePaymentConstant.DateTimeFormatStr.yyyyMMddHHmmss);
+            s.RechargeAmountStr = s.RechargeAmount.ToString("F2");
+            s.PayAmountStr = s.PayAmount.ToString("F2");
+            s.PayTimeStr = !s.PayTime.HasValue ? string.Empty : s.PayTime.Value.ToString(LifePaymentConstant.DateTimeFormatStr.yyyyMMddHHmmss);
+            s.LifePayTypeStr = s.LifePayType.GetDescription();
+            s.PayStatusStr = s.PayStatus.GetDescription();
+            s.ActualRechargeAmountStr = s.ActualRechargeAmount.ToString("F2");
+            s.LifePayRefundStatusStr = s.LifePayRefundStatus == LifePayRefundStatusEnum.鏃犻渶閫�娆� ? "" : s.LifePayRefundStatus.GetDescription();
+            s.ACOOLYStatusStr = s.ACOOLYStatus.GetDescription();
+            s.LifePayOrderStatusStr = s.LifePayOrderStatus.GetDescription();
+            s.FinishTimeStr = !s.FinishTime.HasValue ? string.Empty : s.FinishTime.Value.ToString(LifePaymentConstant.DateTimeFormatStr.yyyyMMddHHmmss);
+        });
+        return result;
+    }
+
     public async Task<string> GetBillErceiptExport(string orderNo)
     {
         try

--
Gitblit v1.9.1