zhengyuxuan
2025-04-02 2b6e63ae8a4af6f612e431c57d2f2f08fb9b9135
fix:加入CreateACOOLYElectricOrder报错日志
3个文件已修改
22 ■■■■■ 已修改文件
LifePayment/LifePayment.Application/LifePay/LifePayService.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
LifePayment/LifePayment.Application/LifePay/StatisticsService.cs 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
LifePayment/LifePayment.HttpApi/LifePay/AliPayNotifyController.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
LifePayment/LifePayment.Application/LifePay/LifePayService.cs
@@ -1194,11 +1194,7 @@
            OutOrderNo = orderNo
        };
        var result = await _aCOOLYManager.ConfirmElectricOrder(requestInput);
#if DEBUG
        _logger.LogInformation($"CreateACOOLYElectricOrder:{JsonConvert.SerializeObject(result)}");
#endif
        CheckExtensions.IfTrueThrowUserFriendlyException(!result.Success || (result.Code != ACOOLYConstant.Code.SUCCESS && result.Code != ACOOLYConstant.Code.PROCESSING),
                                                        result.Message);
LifePayment/LifePayment.Application/LifePay/StatisticsService.cs
@@ -19,6 +19,7 @@
using System.Threading.Channels;
using ZeroD.Util;
using NPOI.SS.Formula.Functions;
using System.Security.Principal;
namespace LifePayment.Application.LifePay
{
@@ -28,19 +29,22 @@
        private readonly IRepository<LifePayUser, Guid> _lifePayUserRepository;
        private readonly IRepository<DallyStatistics, Guid> _dallyStatisticsRepository;
        private readonly IRepository<LifePayChannlesRake, Guid> _lifePayChannlesRakeRepository;
        private readonly IRepository<LifePayRechargeReceipts, Guid> _lifePayRechargeReceiptsRepository;
        private readonly IRepository<LifePayChannles, Guid> _lifePayChannlesRep;
        public StatisticsService(
                              IRepository<LifePayOrder, Guid> lifePayOrderRepository,
                              IRepository<LifePayUser, Guid> lifePayUserRepository,
                            IRepository<DallyStatistics, Guid> dallyStatisticsRepository,
                            IRepository<LifePayChannlesRake, Guid> lifePayChannlesRakeRepository,
                            IRepository<LifePayChannles, Guid> lifePayChannlesRep)
                                IRepository<DallyStatistics, Guid> dallyStatisticsRepository,
                                IRepository<LifePayChannlesRake, Guid> lifePayChannlesRakeRepository,
                                IRepository<LifePayRechargeReceipts, Guid> lifePayRechargeReceiptsRepository,
                                IRepository<LifePayChannles, Guid> lifePayChannlesRep)
        {
            _lifePayOrderRepository = lifePayOrderRepository;
            _lifePayUserRepository = lifePayUserRepository;
            _dallyStatisticsRepository = dallyStatisticsRepository;
            _lifePayChannlesRakeRepository = lifePayChannlesRakeRepository;
            _lifePayRechargeReceiptsRepository = lifePayRechargeReceiptsRepository;
            _lifePayChannlesRep = lifePayChannlesRep;
        }
@@ -240,6 +244,10 @@
        private async Task<DallyStatistics> TopStatistics(string channleId, DateTime today)
        {
            var totalRechargeReceipts = await _lifePayRechargeReceiptsRepository.Where(x => x.IsDeleted == false && x.CreationTime < today).SumAsync(x => x.RechargeAmount);
            var accountBalance = totalRechargeReceipts - await _lifePayOrderRepository.Where(x => x.CreationTime < today && x.PayStatus == LifePayStatusEnum.已支付
            && (x.ACOOLYStatus == ACOOLYStatusEnum.充值成功 || x.ACOOLYStatus == ACOOLYStatusEnum.已完成 || x.ACOOLYStatus == ACOOLYStatusEnum.部分充值成功))
                .WhereIf(!string.IsNullOrWhiteSpace(channleId), x => x.ChannelId == channleId).SumAsync(x => x.PayAmount);
            /// 累计收款:统计平台账户下订单创建时间在昨天及之前收到的【用户支付成功的金额-退款给用户的金额】;
            var accumulatedReceipts = await _lifePayOrderRepository.Where(x => x.CreationTime < today && x.PayStatus != LifePayStatusEnum.未支付)
            .WhereIf(!string.IsNullOrWhiteSpace(channleId), x => x.ChannelId == channleId).SumAsync(x => x.PayAmount) - 
@@ -277,7 +285,7 @@
            {
                Id = GuidGenerator.Create(),
                CreationTime = today,
                Amount = 0,
                Amount = accountBalance ?? 0,
                AccumulatedReceipts = accumulatedReceipts ?? 0,
                AccumulatedIncome = accumulatedIncome ?? 0,
                IncomeYesterday = yesterdayIncome ?? 0,
LifePayment/LifePayment.HttpApi/LifePay/AliPayNotifyController.cs
@@ -83,7 +83,7 @@
            }
            else
            {
                   _logger.LogError($"生活管家支付宝充值回调通知:订单号异常 "+ input.OutTradeNo);
                   _logger.LogError($"生活管家支付宝充值回调通知:订单号异常 " + input.OutTradeNo);
            }
            return new ContentResult