zhengyuxuan
2025-03-27 8d1d296a9a2f1e1fb6b20a9b49ae190bf57650da
LifePayment/LifePayment.HttpApi/LifePay/LifePayController.cs
@@ -1,4 +1,6 @@
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 +24,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;
        }
@@ -182,6 +190,16 @@
            return await _lifePayService.GetIntroInfo(type);
        }
        /// <summary>
        /// 获取在线客服
        /// </summary>
        /// <returns></returns>
        [HttpGet]
        [AllowAnonymous]
        public async Task<string> GetOnlineService()
        {
            return await _commonService.GetOnlineService();
        }
        /// <summary>
        /// 获取用户分页数据
@@ -412,7 +430,18 @@
            return data;
        }
        /// <summary>
        /// 获取充值流水分页数据
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        [HttpPost]
        public async Task<LifePayRechargeReceiptsPageOutput<LifePayRechargeReceiptsListOutput>> GetLifePayRechargeReceiptsPage(LifePayRechargeReceiptsPageInput input)
        {
            return await _lifePayOrderService.GetLifePayRechargeReceiptsPage(input);
        }
        #endregion
        #region 操作
@@ -596,6 +625,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>