| | |
| | | using LifePayment.Application.Contracts; |
| | | using Alipay.AopSdk.F2FPay.Model; |
| | | using LifePayment.Application.Contracts; |
| | | using LifePayment.Application.LifePay; |
| | | using LifePayment.Domain.Common; |
| | | using LifePayment.Domain.Shared; |
| | |
| | | /// <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> |
| | |
| | | /// <param name="input"></param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | public async Task<LifePayRechargeReceiptsPageOutput<LifePayRechargeReceiptsListOutput>> GetLifePayRechargeReceiptsPage(LifePayRechargeReceiptsPageInput input) |
| | | 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<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(); |
| | | } |
| | | |
| | | |
| | | |
| | | #endregion |
| | | |
| | | #region 操作 |