zhengyiming
2025-03-26 67c77f970453ff4d62912060daaf99d2dfc5ed81
fix: bug
4个文件已修改
33 ■■■■■ 已修改文件
LifePayment/LifePayment.Application.Contracts/LifePay/LifePayOutput.cs 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
LifePayment/LifePayment.Application/LifePay/LifePayService.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
LifePayment/LifePayment.Application/LifePay/StatisticsService.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
LifePayment/LifePayment.Host/LifePaymentServices.Application.Contracts.xml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
LifePayment/LifePayment.Application.Contracts/LifePay/LifePayOutput.cs
@@ -377,6 +377,12 @@
    [Name("平台退款状态")]
    public string? LifePayRefundStatusStr { get; set; }
    /// <summary>
    /// 订单状态
    /// </summary>
    [Name("平台订单状态")]
    public LifePayOrderStatusEnum LifePayOrderStatus { get; set; }
    public ACOOLYStatusEnum? ACOOLYStatus { get; set; }
@@ -406,8 +412,8 @@
    ///// </summary>
    //public LifePayOrderStatusEnum LifePayOrderStatus { get; set; }
    //[Name("订单状态")]
    //public string LifePayOrderStatusStr { get; set; }
    [Name("平台订单状态")]
    public string LifePayOrderStatusStr { get; set; }
    /// <summary>
    /// 完成时间
@@ -418,8 +424,6 @@
    public string FinishTimeStr { get; set; }
}
LifePayment/LifePayment.Application/LifePay/LifePayService.cs
@@ -729,7 +729,7 @@
        {
            DiscountAmount = x.DiscountAmount,
            FinishTime = x.FinishTime,
            //LifePayOrderStatus = x.LifePayOrderStatus,
            LifePayOrderStatus = x.LifePayOrderStatus,
            LifePayOrderType = x.LifePayOrderType,
            LifePayType = x.LifePayType,
            OrderNo = x.OrderNo,
@@ -762,7 +762,7 @@
            s.ActualRechargeAmountStr = s.ActualRechargeAmount.ToString("F2");
            s.LifePayRefundStatusStr = s.LifePayRefundStatus == LifePayRefundStatusEnum.无需退款 ? "" : s.LifePayRefundStatus.GetDescription();
            s.ACOOLYStatusStr = s.ACOOLYStatus.GetDescription();
            //s.LifePayOrderStatusStr = s.LifePayOrderStatus.GetDescription();
            s.LifePayOrderStatusStr = s.LifePayOrderStatus.GetDescription();
            s.FinishTimeStr = !s.FinishTime.HasValue ? string.Empty : s.FinishTime.Value.ToString(LifePaymentConstant.DateTimeFormatStr.yyyyMMddHHmmss);
        });
        return result;
@@ -1800,10 +1800,10 @@
    private (decimal PayAmont, decimal DiscountAmount, decimal RechargeAmount) CalculateAmount(decimal amount, decimal rate)
    {
        /// 正常支付
        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, "支付金额错误");
LifePayment/LifePayment.Application/LifePay/StatisticsService.cs
@@ -42,11 +42,11 @@
            if (statistics == null)
            {
                /// 累计收款:统计平台账户下订单创建时间在昨天及之前收到的【用户支付成功的金额-退款给用户的金额】;
                var accumulatedReceipts = await _lifePayOrderRepository.Where(x => x.CreationTime < today && x.PayStatus == LifePayStatusEnum.已支付).SumAsync(x => x.PayAmount) - await _lifePayOrderRepository.Where(x => x.CreationTime < today && x.LifePayRefundStatus == LifePayRefundStatusEnum.已退款).SumAsync(x => x.RefundPrice);
                var accumulatedReceipts = await _lifePayOrderRepository.Where(x => x.CreationTime < today && x.PayStatus != LifePayStatusEnum.未支付).SumAsync(x => x.PayAmount) - await _lifePayOrderRepository.Where(x => x.CreationTime < today && x.LifePayRefundStatus == LifePayRefundStatusEnum.已退款).SumAsync(x => (x.RefundPrice ?? 0));
                /// 昨日收款:统计平台账户下订单创建时间在昨天收到的【用户支付成功的金额-退款给用户的金额】;
                var receiptsYesterday = await _lifePayOrderRepository.Where(x => x.CreationTime >= today.AddDays(-1) && x.CreationTime < today && x.PayStatus == LifePayStatusEnum.已支付).SumAsync(x => x.PayAmount) - await _lifePayOrderRepository.Where(x => x.CreationTime >= today.AddDays(-1) && x.CreationTime < today && x.LifePayRefundStatus == LifePayRefundStatusEnum.已退款).SumAsync(x => x.PayAmount);
                /// 累计收入:统计平台账户下订单状态为“已完成”且订单创建时间在昨天及之前收到的【用户实付金额-平台扣款金额-部分退款金额】;
                var accumulatedIncome = await _lifePayOrderRepository.Where(x => x.CreationTime < today && x.LifePayOrderStatus == LifePayOrderStatusEnum.已完成).SumAsync(x => x.PayAmount - x.PlatformDeductionAmount - x.RefundPrice);
                var accumulatedIncome = await _lifePayOrderRepository.Where(x => x.CreationTime < today && x.LifePayOrderStatus == LifePayOrderStatusEnum.已完成).SumAsync(x => x.PayAmount - (x.PlatformDeductionAmount ?? 0) - (x.RefundPrice ?? 0));
                /// 累计下单:统计平台中订单下单时间在昨天及之前时间的订单记录;
                var accumulatedOrders = await _lifePayOrderRepository.Where(x => x.CreationTime < today).CountAsync();
                /// 昨日下单:统计平台中订单下单时间在昨天的订单记录;
@@ -65,8 +65,8 @@
                    Id = GuidGenerator.Create(),
                    CreationTime = DateTime.Now,
                    Amount = 0,
                    AccumulatedReceipts = accumulatedReceipts.HasValue? accumulatedReceipts.Value:0,
                    AccumulatedIncome = accumulatedIncome.HasValue ? accumulatedIncome.Value : 0,
                    AccumulatedReceipts = accumulatedReceipts,
                    AccumulatedIncome = accumulatedIncome,
                    ReceiptsYesterday = receiptsYesterday,
                    AccumulatedOrders = accumulatedOrders,
                    OrdersNumYesterday = ordersNumYesterday,
LifePayment/LifePayment.Host/LifePaymentServices.Application.Contracts.xml
@@ -928,6 +928,11 @@
            平台退款状态
            </summary>
        </member>
        <member name="P:LifePayment.Application.Contracts.LifePayOrderListTemplate.LifePayOrderStatus">
            <summary>
            订单状态
            </summary>
        </member>
        <member name="P:LifePayment.Application.Contracts.LifePayOrderListTemplate.ACOOLYStatusStr">
            <summary>
            供应商订单状态