| | |
| | | using static LifePayment.Domain.Shared.LifePaymentConstant; |
| | | using ZeroD.Util.Fadd; |
| | | using Nest; |
| | | using Volo.Abp.Domain.Entities; |
| | | using Volo.Abp.ObjectMapping; |
| | | |
| | | namespace LifePayment.Application; |
| | | |
| | |
| | | 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; |
| | |
| | | IRepository<LifePayUser, Guid> lifePayUserRepository, |
| | | IRepository<LifePayPremium, Guid> lifePayPremiumRepository, |
| | | IRepository<LifePayIntroInfo, Guid> lifePayIntroInfoRepository, |
| | | IRepository<DallyStatistics, Guid> dallyStatisticsRepository, |
| | | IAliPayApi aliPayApi, |
| | | IWxPayApi wxPayApi, |
| | | IOptions<WxPayOption> wxPayOptions, |
| | |
| | | _lifePayUserRepository = lifePayUserRepository; |
| | | _lifePayPremiumRepository = lifePayPremiumRepository; |
| | | _lifePayIntroInfoRepository = lifePayIntroInfoRepository; |
| | | _dallyStatisticsRepository = dallyStatisticsRepository; |
| | | _aliPayApi = aliPayApi; |
| | | _wxPayApi = wxPayApi; |
| | | _wxPayOptions = wxPayOptions.Value; |
| | |
| | | } |
| | | |
| | | #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> |
| | | /// 获取电费面值 |
| | |
| | | Id = order.Id, |
| | | OutOrderNo = order.OutOrderNo, |
| | | LifePayChannle = channle.ChannlesName, |
| | | LifePayOrderStatus = order.LifePayOrderStatus, |
| | | Status = order.LifePayOrderStatus, |
| | | LifePayOrderType = order.LifePayOrderType, |
| | | LifePayType = order.LifePayType, |
| | | OrderNo = order.OrderNo, |
| | |
| | | RefundCheckRemark = order.RefundCheckRemark, |
| | | RefundApplyRemark = order.RefundApplyRemark, |
| | | RefundTime = order.RefundTime, |
| | | RefundOrderNo = order.RefundOrderNo, |
| | | ACOOLYOrderNo = order.ACOOLYOrderNo, |
| | | LifePayRefundStatus = order.LifePayRefundStatus, |
| | | ActualRechargeAmount = order.ActualRechargeAmount, |