zhengyuxuan
2025-03-26 5d0390cfb35e484427f41d236590f59dddae7e6d
LifePayment/LifePayment.Application/LifePay/LifePayService.cs
@@ -402,7 +402,6 @@
        var channle = await _lifePayChannlesRep.FirstOrDefaultAsync(r => r.ChannlesNum == order.ChannelId);
        CheckExtensions.IfTrueThrowUserFriendlyException(order == null, "订单不存在");
        var user = await _lifePayUserRepository.FirstOrDefaultAsync(x => x.Id == order.UserId);
        var channlesRakePrice = (order.PayAmount - (order.PlatformDeductionAmount == null ? 0 : order.PlatformDeductionAmount)) * channle.ChannlesRakeRate / 100;
        var orderpirce = await GetOrderPrice(order.RechargeAmount, order.PayAmount, order.PlatformRate, order.ChannleRate, order.ChannlesRakeRate, order.PremiumRate);
@@ -1655,7 +1654,7 @@
            dto.Status = input.Status;
            #region 记录日志
            await PublishLifePayOrderHistoryEvent("渠道管理", "编辑", input.Id.Value, TableType.LifePayChannles);
            await LifePayOrderHistory("渠道管理", "编辑", input.Id.Value, TableType.LifePayChannles);
            #endregion
        }
@@ -1668,7 +1667,7 @@
            #region 记录日志
            await PublishLifePayOrderHistoryEvent("渠道管理", "新增", input.Id.Value, TableType.LifePayChannles);
            await LifePayOrderHistory("渠道管理", "新增", input.Id.Value, TableType.LifePayChannles);
            #endregion
        }
@@ -1685,8 +1684,7 @@
        #region 记录日志
        await PublishLifePayOrderHistoryEvent("渠道管理", status.GetDescription(), id, TableType.LifePayChannles);
        await LifePayOrderHistory("渠道管理", status.GetDescription(), id, TableType.LifePayChannles);
        #endregion
    }
@@ -1800,10 +1798,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, "支付金额错误");