LifePayment/LifePayment.Application/LifePay/LifePayService.cs
@@ -1349,6 +1349,7 @@
    public async Task LifePaySuccessHandler(string orderNo, string outOrderNo)
    {
        var order = await _lifePayOrderRepository.Where(x => x.OrderNo == orderNo).FirstOrDefaultAsync();
        _logger.LogInformation($"正在处理订单:{order?.Id}-{order?.PayStatus}");
        CheckExtensions.IfTrueThrowUserFriendlyException(order == null, "订单不存在");
        if (order.PayStatus != LifePayStatusEnum.未支付)
@@ -1377,6 +1378,7 @@
                default:
                    break;
            }
            _logger.LogInformation("已向供应商发起订单");
            order.LifePayRefundStatus = LifePayRefundStatusEnum.无需退款;
            order.LifePayOrderStatus = LifePayOrderStatusEnum.充值中;
@@ -1384,10 +1386,13 @@
            order.OutRequestNo = result.RequestNo.IsNullOrEmpty() ? null : result.RequestNo;
            order.ACOOLYOrderNo = result.ACOOLYOrderNo;
            order.ACOOLYStatus = ACOOLYStatusEnum.充值中;
            await _lifePayOrderRepository.UpdateAsync(order);
            _logger.LogInformation("生活缴费订单状态:" + order.LifePayOrderStatus.ToString());
            /// 创建生活缴费消费记录
            await _lifePayOrderService.CreatLifePayConsumption(ACOOLYStatusEnum.充值中, order.OrderNo, order.ACOOLYOrderNo,
                                order.PlatformDeductionAmount ?? 0, order.ChannelId, order.CreationTime, order.FinishTime);
            _logger.LogInformation("已插入消费记录");
        }
        catch (Exception ex)
        {
@@ -1396,10 +1401,9 @@
            order.LifePayRefundStatus = LifePayRefundStatusEnum.待退款;
            order.ACOOLYStatus = ACOOLYStatusEnum.充值失败;
            order.RefundApplyRemark = ex.Message;
            await _lifePayOrderRepository.UpdateAsync(order);
            _logger.LogError("生活缴费订单状态:" + order.LifePayOrderStatus.ToString());
        }
        _logger.LogError("生活缴费订单状态:" + order.LifePayOrderStatus.ToString());
        await _lifePayOrderRepository.UpdateAsync(order);
    }
    public async Task LifePayRefundsHandler(string orderNo, LifePayRefundStatusEnum refundStatus)
@@ -1791,6 +1795,9 @@
                dto.PromoterId = promoter.Id;
            }
            var rate = await _lifePayRateRepository.FirstOrDefaultAsync(it => it.RateType == LifePayRateTypeEnum.供应商折扣价);
            CheckExtensions.IfTrueThrowUserFriendlyException(rate != null && input.ChannlesRate < rate.Rate, "渠道折扣无法低于供应商折扣");
            dto.ChannlesName = input.ChannlesName;
            dto.ChannlesNum = input.ChannlesNum;
            dto.ChannlesRate = input.ChannlesRate;
@@ -1800,6 +1807,7 @@
            dto.AgentType = input.AgentType;
            dto.AreaProvinceId = input.AreaProvinceId;
            dto.AreaCityId = input.AreaCityId;
            #region 记录日志
            await LifePayOrderHistory("渠道管理", "编辑", input.Id.Value, TableType.LifePayChannles);