From d7399b083de823860a56b68c79f8e36603fb4ea3 Mon Sep 17 00:00:00 2001
From: zhengyuxuan <zhengyuxuan1995>
Date: 星期一, 31 三月 2025 13:37:19 +0800
Subject: [PATCH] fix:获取渠道分佣分页列表

---
 LifePayment/LifePayment.HttpApi/LifePay/LifePayController.cs |  205 ++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 200 insertions(+), 5 deletions(-)

diff --git a/LifePayment/LifePayment.HttpApi/LifePay/LifePayController.cs b/LifePayment/LifePayment.HttpApi/LifePay/LifePayController.cs
index ed87e63..e51e445 100644
--- a/LifePayment/LifePayment.HttpApi/LifePay/LifePayController.cs
+++ b/LifePayment/LifePayment.HttpApi/LifePay/LifePayController.cs
@@ -1,4 +1,7 @@
-锘縰sing LifePayment.Application.Contracts;
+锘縰sing Alipay.AopSdk.F2FPay.Model;
+using LifePayment.Application.Contracts;
+using LifePayment.Application.LifePay;
+using LifePayment.Domain.Common;
 using LifePayment.Domain.Shared;
 using Microsoft.AspNetCore.Authorization;
 using Microsoft.AspNetCore.Mvc;
@@ -22,17 +25,23 @@
         private readonly ILifePayService _lifePayService;
         private readonly IStatisticsService _statisticsService;
         private readonly IWebClientInfoProvider _webClientInfoProvider;
+        private readonly ICommonService _commonService;
+        private readonly ILifePayOrderService _lifePayOrderService;
         private readonly ILogger<LifePayController> _logger;
         public LifePayController(
               ILifePayService lifePayService,
               IStatisticsService statisticsService,
-              IWebClientInfoProvider webClientInfoProvider
-            , ILogger<LifePayController> logger
+              IWebClientInfoProvider webClientInfoProvider,
+              ICommonService commonService,
+              ILifePayOrderService lifePayOrderService,
+              ILogger<LifePayController> logger
               )
         {
             _lifePayService = lifePayService;
             _statisticsService = statisticsService;
             _webClientInfoProvider = webClientInfoProvider;
+            _commonService = commonService;
+            _lifePayOrderService = lifePayOrderService;
             _logger = logger;
         }
 
@@ -44,9 +53,9 @@
         /// <returns></returns>
         [HttpGet]
         [AllowAnonymous]
-        public async Task<TopStatisticsOutput> GetTopStatistics()
+        public async Task<TopStatisticsOutput> GetTopStatistics(string channleId = "")
         {
-            return await _statisticsService.GetTopStatistics();
+            return await _statisticsService.GetTopStatistics(channleId);
         }
 
         /// <summary>
@@ -150,6 +159,17 @@
         }
 
         /// <summary>
+        /// 鑾峰彇娓犻亾鎶樻墸
+        /// </summary>
+        /// <returns></returns>
+        [HttpPost]
+        [AllowAnonymous]
+        public async Task<ChannelRateOutput> GetChannelRate(ChannelsBaseInput input)
+        {
+            return await _lifePayService.GetChannelRate(input);
+        }
+
+        /// <summary>
         /// 鑾峰彇鎵嬬画璐硅垂鐜�
         /// </summary>
         /// <returns></returns>
@@ -171,6 +191,16 @@
             return await _lifePayService.GetIntroInfo(type);
         }
 
+        /// <summary>
+        /// 鑾峰彇鍦ㄧ嚎瀹㈡湇
+        /// </summary>
+        /// <returns></returns>
+        [HttpGet]
+        [AllowAnonymous]
+        public async Task<string> GetOnlineService()
+        {
+            return await _commonService.GetOnlineService();
+        }
 
         /// <summary>
         /// 鑾峰彇鐢ㄦ埛鍒嗛〉鏁版嵁
@@ -401,6 +431,136 @@
 
             return data;
         }
+        /// <summary>
+        /// 鑾峰彇鍏呭�兼祦姘村垎椤垫暟鎹�
+        /// </summary>
+        /// <param name="input"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public async Task<PageOutput<LifePayRechargeReceiptsListOutput>> GetLifePayRechargeReceiptsPage(LifePayRechargeReceiptsPageInput input)
+        {
+            return await _lifePayOrderService.GetLifePayRechargeReceiptsPage(input);
+        }
+
+        /// <summary>
+        /// 鑾峰彇娓犻亾鍒嗕剑鍒嗛〉鍒楄〃
+        /// </summary>
+        /// <param name="input"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public async Task<PageOutput<LifePayChannlesRakeListOutput>> GetLifePayChannlesRakePage(LifePayChannlesRakePageInput input)
+        {
+            return await _lifePayOrderService.GetLifePayChannlesRakePage(input);
+        }
+
+        /// <summary>
+        /// 鑾峰彇鏀舵敮娴佹按鍒嗛〉鏁版嵁
+        /// </summary>
+        /// <param name="input"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public async Task<PageOutput<LifePayExpensesReceiptsListOutput>> GetLifePayExpensesReceiptsPage(LifePayExpensesReceiptsPageInput input)
+        {
+            return await _lifePayOrderService.GetLifePayExpensesReceiptsPage(input);
+        }
+
+        /// <summary>
+        /// 鏌ヨ鏀粯瀹濇敮浠樿鍗曚俊鎭�
+        /// </summary>
+        /// <param name="input"></param>
+        /// <returns></returns>
+        [HttpPost]
+        [AllowAnonymous]
+        public async Task<Alipay.EasySDK.Payment.Common.Models.AlipayTradeQueryResponse> QueryAlipayTrade(OrderInQuiryInput input)
+        {
+            var res = await _lifePayService.QueryAlipayTrade(input);
+            //await _lifePayOrderService.AddLifePayExpensesReceipts(new AddLifePayExpensesReceiptsInput()
+            //{
+            //    OrderNo = input.OutTradeNo,
+            //    OutOrderNo = res.TradeNo,
+            //    LifePayType = LifePayTypeEnum.AliPay,
+            //    ExpensesReceiptsType = ExpensesReceiptsTypeEnum.Expenses,
+            //    Amount = Convert.ToDecimal(res.ReceiptAmount)
+            //});
+            return res;
+        }
+
+        /// <summary>
+        /// 鏌ヨ鏀粯瀹濋��娆捐鍗曚俊鎭�
+        /// </summary>
+        /// <param name="input"></param>
+        /// <returns></returns>
+        [HttpPost]
+        [AllowAnonymous]
+        public async Task<Alipay.EasySDK.Payment.Common.Models.AlipayTradeFastpayRefundQueryResponse> QueryAlipayTradeRefund(OrderInQuiryInput input)
+        {
+            return await _lifePayService.QueryAlipayTradeRefund(input);
+        }
+
+        /// <summary>
+        /// 鏌ヨ寰俊閫�娆句俊鎭�
+        /// </summary>
+        /// <param name="outTradeNo"></param>
+        /// <returns></returns>
+        [HttpGet]
+        [AllowAnonymous]
+        public async Task<WxPayDomesticRefundsQueryReponse> WxPayDomesticRefundsQuery(string outTradeNo)
+        {
+            var res = await _lifePayService.WxPayDomesticRefundsQuery(outTradeNo);
+            await _lifePayOrderService.AddLifePayExpensesReceipts(new AddLifePayExpensesReceiptsInput()
+            {
+                OrderNo = res.OutTradeNo,
+                OutOrderNo = res.TransactionId,
+                LifePayType = LifePayTypeEnum.WxPay,
+                ExpensesReceiptsType = ExpensesReceiptsTypeEnum.Expenses,
+                Amount = Convert.ToDecimal(res.Amount.Total)
+            });
+            return res;
+        }
+
+        /// <summary>
+        /// 鏌ヨ寰俊璁㈠崟淇℃伅
+        /// </summary>
+        /// <param name="outTradeNo"></param>
+        /// <returns></returns>
+        [HttpGet]
+        [AllowAnonymous]
+        public async Task<WxPayTradeQueryReponse> WxPayTradeQuery(string outTradeNo)
+        {
+            var res = await _lifePayService.WxPayTradeQuery(outTradeNo);
+            await _lifePayOrderService.AddLifePayExpensesReceipts(new AddLifePayExpensesReceiptsInput()
+            {
+                OrderNo = res.OutTradeNo,
+                OutOrderNo = res.TransactionId,
+                LifePayType = LifePayTypeEnum.WxPay,
+                ExpensesReceiptsType = ExpensesReceiptsTypeEnum.Expenses,
+                Amount = Convert.ToDecimal(res.Amount.Total)
+            });
+            return res;
+        }
+
+        /// <summary>
+        /// 鍚屾璁㈠崟鏀舵敮淇℃伅
+        /// </summary>
+        /// <returns></returns>
+        [HttpGet]
+        [AllowAnonymous]
+        public async Task GetAllLifePayExpensesReceipts()
+        {
+            await _lifePayOrderService.GetAllLifePayExpensesReceipts();
+        }
+
+        /// <summary>
+        /// 鍚屾璁㈠崟
+        /// </summary>
+        /// <returns></returns>
+        [HttpGet]
+        [AllowAnonymous]
+        public async Task GetAllChannlesRake()
+        {
+            await _lifePayOrderService.GetAllChannlesRake();
+        }
+
 
         #endregion
 
@@ -443,6 +603,17 @@
         public async Task<CreateLifePayOrderOutput> CreateLifePayGasOrder(CreateLifePayOrderInput<LifeGasData> input)
         {
             return await _lifePayService.CreateLifePayGasOrder(input);
+        }
+
+        /// <summary>
+        /// 淇敼瀹為檯鍒拌处閲戦
+        /// </summary>
+        /// <param name="input"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public async Task<int> UpdateLifePayOrderActualReceivedAmount(UpdateLifePayOrderInput input)
+        {
+            return await _lifePayService.UpdateLifePayOrderActualReceivedAmount(input);
         }
 
         /// <summary>
@@ -574,6 +745,30 @@
         }
 
         /// <summary>
+        /// 鍦ㄧ嚎瀹㈡湇閰嶇疆
+        /// </summary>
+        /// <param name="input"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public async Task<int> UpdateOnlineService(OnlineServiceInput input)
+        {
+            await _commonService.UpdateOnlineService(input);
+            return Constant.SUCCESS;
+        }
+
+        /// <summary>
+        /// 涓婁紶鍏呭�兼祦姘�
+        /// </summary>
+        /// <param name="input"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public async Task<int> AddUpdatePayRechargeReceipts(AddUpdatePayRechargeReceiptsInput input)
+        {
+            await _lifePayOrderService.AddUpdatePayRechargeReceipts(input);
+            return Constant.SUCCESS;
+        }
+
+        /// <summary>
         /// 璁剧疆鐢熸椿缂磋垂鏀粯绫诲瀷
         /// </summary>
         /// <param name="input"></param>

--
Gitblit v1.9.1