zhengyuxuan
2025-04-02 2c511ccf6541384f517eda69f897a23404573983
fix:bug修复
3个文件已修改
75 ■■■■■ 已修改文件
LifePayment/LifePayment.Application.Contracts/LifePay/LifePayInput.cs 55 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
LifePayment/LifePayment.Application/LifePay/LifePayOrderService.cs 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
LifePayment/LifePayment.Application/LifePay/LifePayService.cs 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
LifePayment/LifePayment.Application.Contracts/LifePay/LifePayInput.cs
@@ -704,6 +704,61 @@
    /// </summary>
    public decimal Amount { get; set; }
}
public class AddLifePayChannlesRakeReceiptsInput
{
    /// <summary>
    /// 平台折扣比例
    /// </summary>
    public decimal? PlatformRate { get; set; }
    /// <summary>
    /// 渠道折扣
    /// </summary>
    public decimal? ChannleRate { get; set; }
    /// <summary>
    /// 充值金额
    /// </summary>
    public decimal? RechargeAmount { get; set; }
    /// <summary>
    /// 平台订单号
    /// </summary>
    public string OrderNo { get; set; }
    /// <summary>
    /// 成交金额
    /// </summary>
    public decimal PayAmount { get; set; }
    /// <summary>
    /// 渠道佣金比例
    /// </summary>
    public decimal ChannlesRakeRate { get; set; }
    /// <summary>
    /// 佣金
    /// </summary>
    public decimal ChannlesRakePrice { get; set; }
    /// <summary>
    /// 结算时间
    /// </summary>
    public DateTime FinishTime { get; set; }
    /// <summary>
    /// 拓展属性
    /// </summary>
    public string ExtraProperties { get; set; }
    /// <summary>
    /// 下单渠道
    /// </summary>
    public string ChannelId { get; set; }
}
public class LifePayExpensesReceiptsPageInput : ChannelsBaseInput
{
    /// <summary>
LifePayment/LifePayment.Application/LifePay/LifePayOrderService.cs
@@ -338,6 +338,9 @@
            }
        }
        /// <summary>
        /// 统计所有消费流水
        /// </summary>
@@ -429,6 +432,10 @@
            }
        }
        /// <summary>
        /// 获取全部渠道分佣
        /// </summary>
        /// <returns></returns>
        public async Task GetAllChannlesRake()
        {
            var orderlist = await _lifePayOrderRepository.Where(x => x.IsDeleted == false && x.PayStatus == LifePayStatusEnum.已支付 && x.LifePayOrderStatus == LifePayOrderStatusEnum.已完成).ToListAsync();
@@ -444,9 +451,9 @@
                    LifePayChannlesRake lifePayChannlesRake = new LifePayChannlesRake()
                    {
                        OrderNo = item.OrderNo,
                        PayAmount = item.PayAmount.Value,
                        ChannlesRakeRate = item.ChannlesRakeRate.Value,
                        ChannlesRakePrice = channlesRakePrice.Value,
                        PayAmount = item.RechargeAmount ?? 0,
                        ChannlesRakeRate = item.ChannlesRakeRate ?? 0,
                        ChannlesRakePrice = channlesRakePrice ?? 0,
                        FinishTime = item.FinishTime.Value,
                        ChannelId = item.ChannelId,
                    };
LifePayment/LifePayment.Application/LifePay/LifePayService.cs
@@ -1416,6 +1416,7 @@
        if (order.LifePayOrderStatus == LifePayOrderStatusEnum.已完成)
        {
            ///结算渠道佣金
            /// 毛利
            var grossProfit = order.RechargeAmount * (order.ChannleRate - order.PlatformRate) / 100;
            /// 渠道佣金  ((充值面额 * 渠道折扣比例)-(充值面额 * 平台折扣比例))* 佣金比例
@@ -1425,9 +1426,9 @@
                LifePayChannlesRake lifePayChannlesRake = new LifePayChannlesRake()
                {
                    OrderNo = order.OrderNo,
                    PayAmount = order.PayAmount.Value,
                    ChannlesRakeRate = order.ChannlesRakeRate.Value,
                    ChannlesRakePrice = channlesRakePrice.Value,
                    PayAmount = order.RechargeAmount ?? 0,
                    ChannlesRakeRate = order.ChannlesRakeRate ?? 0,
                    ChannlesRakePrice = channlesRakePrice ?? 0,
                    FinishTime = order.FinishTime.Value,
                    ChannelId = order.ChannelId,
                };