From f885db9e204c172c62779f45c3edee3cae463b8d Mon Sep 17 00:00:00 2001
From: zhengyiming <540361168@qq.com>
Date: 星期二, 01 四月 2025 16:00:33 +0800
Subject: [PATCH] Merge branch 'dev-lifepay-v1.3' of http://120.26.58.240:8888/r/LifePaymentApi into dev-lifepay-v1.3

---
 LifePayment/LifePayment.HttpApi/LifePay/LifePayController.cs |   46 ++++++++++++++++++++++++++++++++++++----------
 1 files changed, 36 insertions(+), 10 deletions(-)

diff --git a/LifePayment/LifePayment.HttpApi/LifePay/LifePayController.cs b/LifePayment/LifePayment.HttpApi/LifePay/LifePayController.cs
index b25cbc7..606efc1 100644
--- a/LifePayment/LifePayment.HttpApi/LifePay/LifePayController.cs
+++ b/LifePayment/LifePayment.HttpApi/LifePay/LifePayController.cs
@@ -1,6 +1,7 @@
 锘縰sing Alipay.AopSdk.F2FPay.Model;
 using LifePayment.Application.Contracts;
 using LifePayment.Application.LifePay;
+using LifePayment.Domain;
 using LifePayment.Domain.Common;
 using LifePayment.Domain.Shared;
 using Microsoft.AspNetCore.Authorization;
@@ -50,12 +51,32 @@
         /// <summary>
         /// 鑾峰彇椤堕儴缁熻鏁版嵁
         /// </summary>
+        /// <param name="input"></param>
         /// <returns></returns>
-        [HttpGet]
+        [HttpPost]
         [AllowAnonymous]
-        public async Task<TopStatisticsOutput> GetTopStatistics(string channleId = "")
+        public async Task<TopStatisticsOutput> GetTopStatistics(TopStatisticsInput input)
         {
-            return await _statisticsService.GetTopStatistics(channleId);
+            return await _statisticsService.GetTopStatistics(input.ChannleList);
+        }
+
+        /// <summary>
+        /// 鑾峰彇30鏃ユ敹娆剧粺璁�
+        /// </summary>
+        /// <param name="input"></param>
+        /// <returns></returns>
+        [HttpPost]
+        [AllowAnonymous]
+        public async Task<ReceiptsListOutPut> GetReceiptsList(TopStatisticsInput input)
+        {
+            return await _statisticsService.GetReceiptsList(input.ChannleList);
+        }
+
+        [HttpPost]
+        [AllowAnonymous]
+        public async Task<ChannelDataListOutPut> GetChannelDataList(TopStatisticsInput input)
+        {
+            return await _statisticsService.GetChannelDataList(input.ChannleList);
         }
 
         /// <summary>
@@ -523,15 +544,20 @@
         public async Task<WxPayDomesticRefundsQueryReponse> WxPayDomesticRefundsQuery(string outTradeNo)
         {
             var res = await _lifePayService.WxPayDomesticRefundsQuery(outTradeNo);
-            await _lifePayOrderService.AddLifePayExpensesReceipts(new AddLifePayExpensesReceiptsInput()
+            if (res.Code == WxpayResultCode.Success)
             {
-                OrderNo = res.OutTradeNo,
-                OutOrderNo = res.TransactionId,
-                LifePayType = LifePayTypeEnum.WxPay,
-                ExpensesReceiptsType = ExpensesReceiptsTypeEnum.Expenses,
-                Amount = Convert.ToDecimal(res.Amount.Total)
-            });
+                await _lifePayOrderService.AddLifePayExpensesReceipts(new AddLifePayExpensesReceiptsInput()
+                {
+                    OrderNo = res.OutTradeNo,
+                    OutRefundNo = res.RefundId,
+                    OutOrderNo = res.TransactionId,
+                    LifePayType = LifePayTypeEnum.WxPay,
+                    ExpensesReceiptsType = ExpensesReceiptsTypeEnum.Expenses,
+                    Amount = Convert.ToDecimal(res.Amount.Total)
+                });
+            }
             return res;
+
         }
 
         /// <summary>

--
Gitblit v1.9.1