zhengyuxuan
2025-04-01 e08d70b9e610a2c176b88cb092d580754e009de5
LifePayment/LifePayment.HttpApi/LifePay/LifePayController.cs
@@ -1,6 +1,7 @@
using 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;
@@ -57,6 +58,25 @@
        public async Task<TopStatisticsOutput> GetTopStatistics(TopStatisticsInput input)
        {
            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>
@@ -524,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>