| | |
| | | private readonly IRepository<LifePayChannles, Guid> _lifePayChannlesRep; |
| | | private readonly IRepository<LifePayAccount, Guid> _lifePayAccount; |
| | | private readonly IRepository<OperateHistory, Guid> _operateHistory; |
| | | private readonly IRepository<LifePayChannlesRake, Guid> _lifePayChannlesRakeRepository; |
| | | private readonly IDataFilter dataFilter; |
| | | private readonly IChannelFilter _channelFilter; |
| | | private readonly IAliPayApi _aliPayApi; |
| | |
| | | IRepository<LifePayUser, Guid> lifePayUserRepository, |
| | | IRepository<LifePayPremium, Guid> lifePayPremiumRepository, |
| | | IRepository<LifePayIntroInfo, Guid> lifePayIntroInfoRepository, |
| | | IRepository<LifePayChannlesRake, Guid> lifePayChannlesRakeRepository, |
| | | IRepository<OperateHistory, Guid> operateHistory, |
| | | IAliPayApi aliPayApi, |
| | | IAlipayInterfaceManager aliPayInterfaceManager, |
| | |
| | | _lifePayRateRepository = lifePayRateRepository; |
| | | _lifePayOrderRepository = lifePayOrderRepository; |
| | | _lifePayUserRepository = lifePayUserRepository; |
| | | _lifePayChannlesRakeRepository = lifePayChannlesRakeRepository; |
| | | _lifePayPremiumRepository = lifePayPremiumRepository; |
| | | _lifePayIntroInfoRepository = lifePayIntroInfoRepository; |
| | | _aliPayApi = aliPayApi; |
| | |
| | | order.ACOOLYStatus = acoolyStatus; |
| | | order.FinishTime = DateTime.Now; |
| | | await _lifePayOrderRepository.UpdateAsync(order); |
| | | |
| | | if (order.LifePayOrderStatus == LifePayOrderStatusEnum.已完成) |
| | | { |
| | | /// 毛利 |
| | | var grossProfit = order.RechargeAmount * (order.ChannleRate - order.PlatformRate) / 100; |
| | | /// 渠道佣金 ((充值面额 * 渠道折扣比例)-(充值面额 * 平台折扣比例))* 佣金比例 |
| | | var channlesRakePrice = grossProfit * (order.ChannlesRakeRate) / 100; |
| | | if (channlesRakePrice.HasValue) |
| | | { |
| | | LifePayChannlesRake lifePayChannlesRake = new LifePayChannlesRake() |
| | | { |
| | | OrderNo = order.OrderNo, |
| | | PayAmount = order.PayAmount.Value, |
| | | ChannlesRakeRate = order.ChannlesRakeRate.Value, |
| | | ChannlesRakePrice = channlesRakePrice.Value, |
| | | FinishTime = order.FinishTime.Value, |
| | | ChannelId = order.ChannelId, |
| | | }; |
| | | await _lifePayChannlesRakeRepository.InsertAsync(lifePayChannlesRake); |
| | | } |
| | | } |
| | | } |
| | | |
| | | /// <summary> |