zhengyuxuan
2025-03-20 946e61a3eec7ee3beb63a70105f47a0cb978791b
LifePayment/LifePayment.Application/LifePay/LifePayService.cs
@@ -23,6 +23,8 @@
using static LifePayment.Domain.Shared.LifePaymentConstant;
using ZeroD.Util.Fadd;
using Nest;
using Volo.Abp.Domain.Entities;
using Volo.Abp.ObjectMapping;
namespace LifePayment.Application;
@@ -36,6 +38,7 @@
    private readonly IRepository<LifePayOrder, Guid> _lifePayOrderRepository;
    private readonly IRepository<LifePayUser, Guid> _lifePayUserRepository;
    private readonly IRepository<LifePayIntroInfo, Guid> _lifePayIntroInfoRepository;
    private readonly IRepository<DallyStatistics, Guid> _dallyStatisticsRepository;
    private readonly IRepository<LifePayChannles, Guid> _lifePayChannlesRep;
    private readonly IRepository<LifePayAccount, Guid> _lifePayAccount;
    private readonly IDataFilter dataFilter;
@@ -54,6 +57,7 @@
                          IRepository<LifePayUser, Guid> lifePayUserRepository,
                          IRepository<LifePayPremium, Guid> lifePayPremiumRepository,
                          IRepository<LifePayIntroInfo, Guid> lifePayIntroInfoRepository,
                          IRepository<DallyStatistics, Guid> dallyStatisticsRepository,
                          IAliPayApi aliPayApi,
                          IWxPayApi wxPayApi,
                          IOptions<WxPayOption> wxPayOptions,
@@ -69,6 +73,7 @@
        _lifePayUserRepository = lifePayUserRepository;
        _lifePayPremiumRepository = lifePayPremiumRepository;
        _lifePayIntroInfoRepository = lifePayIntroInfoRepository;
        _dallyStatisticsRepository = dallyStatisticsRepository;
        _aliPayApi = aliPayApi;
        _wxPayApi = wxPayApi;
        _wxPayOptions = wxPayOptions.Value;
@@ -80,6 +85,23 @@
    }
    #region 查询
    public async Task<TopStatisticsOutput> GetTopStatistics()
    {
        var today = DateTime.Now.ToString("yyyy-MM-dd");
        var statistics = await _dallyStatisticsRepository.Where(x => x.CreationTime.ToString("yyyy-MM-dd") == today).FirstOrDefaultAsync();
        if (statistics == null)
        {
            return new TopStatisticsOutput();
        }
        else
        {
            var result = ObjectMapper.Map<DallyStatistics,TopStatisticsOutput>(statistics);
            return result;
        }
    }
    /// <summary>
    /// 获取电费面值
@@ -336,7 +358,7 @@
            Id = order.Id,
            OutOrderNo = order.OutOrderNo,
            LifePayChannle = channle.ChannlesName,
            LifePayOrderStatus = order.LifePayOrderStatus,
            Status = order.LifePayOrderStatus,
            LifePayOrderType = order.LifePayOrderType,
            LifePayType = order.LifePayType,
            OrderNo = order.OrderNo,
@@ -349,6 +371,7 @@
            RefundCheckRemark = order.RefundCheckRemark,
            RefundApplyRemark = order.RefundApplyRemark,
            RefundTime = order.RefundTime,
            RefundOrderNo = order.RefundOrderNo,
            ACOOLYOrderNo = order.ACOOLYOrderNo,
            LifePayRefundStatus = order.LifePayRefundStatus,
            ActualRechargeAmount = order.ActualRechargeAmount,