LifePayment/LifePayment.Application/LifePay/LifePayService.cs
@@ -130,6 +130,16 @@
    }
    /// <summary>
    /// 话费订单查询
    /// </summary>
    /// <param name="input"></param>
    /// <returns></returns>
    public async Task<QueryPhoneOrderResponse> QueryPhoneOrder(QueryPhoneOrderRequestInput input)
    {
        return await _aCOOLYManager.QueryPhoneOrder(input);
    }
    /// <summary>
    /// 获取话费面值
    /// </summary>
    /// <param name="input"></param>
@@ -353,6 +363,7 @@
                                RefundPrice = a.RefundPrice,
                                ChannelName = b.ChannlesName,
                                ActualRechargeAmount = a.RechargeAmount,
                                ActualReceivedAmount = a.ActualReceivedAmount,
                                PlatformDeductionAmount = a.PlatformDeductionAmount,
                                ACOOLYStatus = a.ACOOLYStatus,
                                LifePayRefundStatus = a.LifePayRefundStatus,
@@ -453,6 +464,7 @@
            PremiumPrice = orderpirce.PremiumPrice,
            Profit = orderpirce.Profit,
            RefundOrderNo = order.RefundOrderNo,
            ActualReceivedAmount = order.ActualReceivedAmount
        };
        return result;
@@ -1376,12 +1388,13 @@
        var order = await _lifePayOrderRepository.Where(x => x.OrderNo == orderNo).FirstOrDefaultAsync();
        CheckExtensions.IfTrueThrowUserFriendlyException(order == null, "订单不存在");
        if (order.LifePayOrderStatus == LifePayOrderStatusEnum.已完成)
        if (order.LifePayOrderStatus == status && order.ACOOLYStatus == acoolyStatus)
        {
            _logger.LogInformation($"订单({orderNo})已处理该状态");
            return;
        }
         //order.PlatformDeductionAmount = payAmount;
        order.ActualReceivedAmount = actualParValue;
        if (acoolyOrderNo.IsNotNullOrEmpty())
        {
@@ -1404,6 +1417,8 @@
            || order.LifePayOrderStatus == LifePayOrderStatusEnum.已退款)
        {
            order.FinishTime = DateTime.Now;
            order.PlatformDeductionAmount = Math.Round((order.ActualReceivedAmount ?? 0) * (order.PlatformRate ?? 0) / 100, 2);
            order.RefundPrice = Math.Round((1 - ((order.ActualReceivedAmount ?? 0) / (order.RechargeAmount ?? 0))) * (order.PayAmount ?? 0), 2);
        }
        await _lifePayOrderRepository.UpdateAsync(order);
@@ -1513,6 +1528,8 @@
        order.RefundTime = DateTime.Now;
        order.RefundCheckUserId = CurrentUser.Id;
        order.RefundPrice = input.RefundPrice;
        order.ActualReceivedAmount = Math.Round((1 - ((order.RefundPrice ?? 0) / (order.PayAmount ?? 0))) * (order.RechargeAmount ?? 0), 2);
        order.PlatformDeductionAmount = Math.Round((order.ActualReceivedAmount ?? 0) * (order.PlatformRate ?? 0) / 100, 2);
        //await _lifePayOrderRepository.UpdateAsync(order);