From 0dfdacf054c5d9539a12da3f97402b1cf45ffb77 Mon Sep 17 00:00:00 2001
From: zhengyuxuan <zhengyuxuan1995>
Date: 星期一, 31 三月 2025 14:09:36 +0800
Subject: [PATCH] fix:bug修复
---
LifePayment/LifePayment.Application.Contracts/LifePay/LifePayOutput.cs | 8 ++++
LifePayment/LifePayment.Application/LifePay/LifePayOrderService.cs | 47 +++++++++++++++++++++++
LifePayment/LifePayment.HttpApi/LifePay/LifePayController.cs | 16 ++++++++
LifePayment/LifePayment.Application.Contracts/LifePay/ILifePayOrderService.cs | 1
LifePayment/LifePayment.Host/LifePaymentService.HttpApi.xml | 7 +++
5 files changed, 78 insertions(+), 1 deletions(-)
diff --git a/LifePayment/LifePayment.Application.Contracts/LifePay/ILifePayOrderService.cs b/LifePayment/LifePayment.Application.Contracts/LifePay/ILifePayOrderService.cs
index 84b2d0a..7225a46 100644
--- a/LifePayment/LifePayment.Application.Contracts/LifePay/ILifePayOrderService.cs
+++ b/LifePayment/LifePayment.Application.Contracts/LifePay/ILifePayOrderService.cs
@@ -15,6 +15,7 @@
Task<PageOutput<LifePayExpensesReceiptsListOutput>> GetLifePayExpensesReceiptsPage(LifePayExpensesReceiptsPageInput input);
Task<PageOutput<LifePayChannlesRakeListOutput>> GetLifePayChannlesRakePage(LifePayChannlesRakePageInput input);
+ Task<List<LifePayChannlesRakeListTemplate>> GetLifePayChannlesRakePageExport(LifePayChannlesRakePageInput input);
Task AddUpdatePayRechargeReceipts(AddUpdatePayRechargeReceiptsInput input);
diff --git a/LifePayment/LifePayment.Application.Contracts/LifePay/LifePayOutput.cs b/LifePayment/LifePayment.Application.Contracts/LifePay/LifePayOutput.cs
index ceb6dc1..a595100 100644
--- a/LifePayment/LifePayment.Application.Contracts/LifePay/LifePayOutput.cs
+++ b/LifePayment/LifePayment.Application.Contracts/LifePay/LifePayOutput.cs
@@ -1315,4 +1315,12 @@
/// 涓嬪崟娓犻亾
/// </summary>
public string ChannelId { get; set; }
+}
+public class LifePayChannlesRakeListTemplate
+{
+ [Name("搴忓彿")]
+ public int SerialNumber { get; set; }
+
+ [Name("鎵嬫満鍙�")]
+ public string PhoneNumber { get; set; }
}
\ No newline at end of file
diff --git a/LifePayment/LifePayment.Application/LifePay/LifePayOrderService.cs b/LifePayment/LifePayment.Application/LifePay/LifePayOrderService.cs
index 8780794..f640885 100644
--- a/LifePayment/LifePayment.Application/LifePay/LifePayOrderService.cs
+++ b/LifePayment/LifePayment.Application/LifePay/LifePayOrderService.cs
@@ -117,7 +117,7 @@
public async Task<PageOutput<LifePayChannlesRakeListOutput>> GetLifePayChannlesRakePage(LifePayChannlesRakePageInput input)
{
var list = await _lifePayChannlesRakeRepository.Where(x => x.IsDeleted == false)
- .WhereIf(input.ChannelId != null, x => x.ChannelId == input.ChannelId)
+ .WhereIf(input.ChannelId.IsNotNullOrEmpty(), x => x.ChannelId == input.ChannelId)
.WhereIf(input.CreationTimeBegin.HasValue, x => x.CreationTime >= input.CreationTimeBegin)
.WhereIf(input.CreationTimeEnd.HasValue, x => x.CreationTime <= input.CreationTimeEnd)
.WhereIf(input.FinishTimeBegin.HasValue, x => x.FinishTime >= input.FinishTimeBegin)
@@ -144,6 +144,51 @@
return list;
}
+ public async Task<List<LifePayChannlesRakeListTemplate>> GetLifePayChannlesRakePageExport(LifePayChannlesRakePageInput input)
+ {
+ //var result = await (await GetLifePayOrderListFilter(input)).Select(x => new LifePayOrderListTemplate
+ //{
+ // 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 null;
+ }
+
#endregion
diff --git a/LifePayment/LifePayment.Host/LifePaymentService.HttpApi.xml b/LifePayment/LifePayment.Host/LifePaymentService.HttpApi.xml
index 009d3b5..6f48d5e 100644
--- a/LifePayment/LifePayment.Host/LifePaymentService.HttpApi.xml
+++ b/LifePayment/LifePayment.Host/LifePaymentService.HttpApi.xml
@@ -274,6 +274,13 @@
<param name="input"></param>
<returns></returns>
</member>
+ <member name="M:LifePayment.HttpApi.LifePayController.GetLifePayChannlesRakePageExport(LifePayment.Application.Contracts.LifePayChannlesRakePageInput)">
+ <summary>
+ 瀵煎嚭娓犻亾鍒嗕剑Excel
+ </summary>
+ <param name="input"></param>
+ <returns></returns>
+ </member>
<member name="M:LifePayment.HttpApi.LifePayController.GetLifePayExpensesReceiptsPage(LifePayment.Application.Contracts.LifePayExpensesReceiptsPageInput)">
<summary>
鑾峰彇鏀舵敮娴佹按鍒嗛〉鏁版嵁
diff --git a/LifePayment/LifePayment.HttpApi/LifePay/LifePayController.cs b/LifePayment/LifePayment.HttpApi/LifePay/LifePayController.cs
index e51e445..b25cbc7 100644
--- a/LifePayment/LifePayment.HttpApi/LifePay/LifePayController.cs
+++ b/LifePayment/LifePayment.HttpApi/LifePay/LifePayController.cs
@@ -454,6 +454,22 @@
}
/// <summary>
+ /// 瀵煎嚭娓犻亾鍒嗕剑Excel
+ /// </summary>
+ /// <param name="input"></param>
+ /// <returns></returns>
+ [HttpPost]
+ public async Task<ActionResult> GetLifePayChannlesRakePageExport(LifePayChannlesRakePageInput input)
+ {
+ var data = await _lifePayOrderService.GetLifePayChannlesRakePageExport(input);
+ if (data.Any())
+ {
+ var bytes = ExcelHelper.ListToByteForExcel(data, "xlsx");
+ return File(bytes, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "娓犻亾鍒嗕剑" + ".xlsx");
+ }
+ return Json(default);
+ }
+ /// <summary>
/// 鑾峰彇鏀舵敮娴佹按鍒嗛〉鏁版嵁
/// </summary>
/// <param name="input"></param>
--
Gitblit v1.9.1