From f677ae3dff51661e4cc0607b9863b859dbccd204 Mon Sep 17 00:00:00 2001 From: zhengyuxuan <zhengyuxuan1995> Date: 星期四, 20 三月 2025 18:04:07 +0800 Subject: [PATCH] fix:退款申请时间 --- LifePayment/LifePayment.Application/LifePay/LifePayService.cs | 22 +++++++++++++++++++--- 1 files changed, 19 insertions(+), 3 deletions(-) diff --git a/LifePayment/LifePayment.Application/LifePay/LifePayService.cs b/LifePayment/LifePayment.Application/LifePay/LifePayService.cs index 866cf83..b10cf07 100644 --- a/LifePayment/LifePayment.Application/LifePay/LifePayService.cs +++ b/LifePayment/LifePayment.Application/LifePay/LifePayService.cs @@ -92,6 +92,21 @@ var statistics = await _dallyStatisticsRepository.Where(x => x.CreationTime.ToString("yyyy-MM-dd") == today).FirstOrDefaultAsync(); if (statistics == null) { + //var accumulatedReceipts = await _lifePayOrderRepository.Where(x => x.CreationTime < today).SumAsync(x => x.PayAmount); + + var entity = new DallyStatistics() + { + Id = GuidGenerator.Create(), + CreationTime = DateTime.Now, + Amount = "0", + AccumulatedReceipts = "0", + ReceiptsYesterda = "0", + AccumulatedOrders = "0", + OrdersNumYesterda = "0", + YesterdaSuccess = "0", + YesterdaFail = "0", + AccumulatedUsers = "0", + }; return new TopStatisticsOutput(); } @@ -308,7 +323,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, @@ -370,6 +385,7 @@ CreationTime = order.CreationTime, RefundCheckRemark = order.RefundCheckRemark, RefundApplyRemark = order.RefundApplyRemark, + RefundApplyTime = order.RefundApplyTime, RefundTime = order.RefundTime, RefundOrderNo = order.RefundOrderNo, ACOOLYOrderNo = order.ACOOLYOrderNo, @@ -1535,10 +1551,10 @@ private (decimal PayAmont, decimal DiscountAmount, decimal RechargeAmount) CalculateAmount(decimal amount, decimal rate) { /// 姝e父鏀粯 - //var payAmount = decimal.Round(amount * rate / 100, 2, MidpointRounding.AwayFromZero); + var payAmount = decimal.Round(amount * rate / 100, 2, MidpointRounding.AwayFromZero); /// 1鍒嗛挶鏀粯 - decimal payAmount = 0.01m; + //decimal payAmount = 0.01m; CheckExtensions.IfTrueThrowUserFriendlyException(payAmount < 0.01m, "鏀粯閲戦閿欒"); -- Gitblit v1.9.1