zhengyuxuan
2025-03-20 c2ff291b6f7c747e171d2d2155282c310503d169
fix:新增日志
2个文件已修改
23 ■■■■■ 已修改文件
LifePayment/LifePayment.Application/LifePay/LifePayService.cs 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
LifePayment/LifePayment.Domain.Shared/Enum/OperateHistory/OperateHistoryTypeEnum.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
LifePayment/LifePayment.Application/LifePay/LifePayService.cs
@@ -41,6 +41,7 @@
    private readonly IRepository<DallyStatistics, Guid> _dallyStatisticsRepository;
    private readonly IRepository<LifePayChannles, Guid> _lifePayChannlesRep;
    private readonly IRepository<LifePayAccount, Guid> _lifePayAccount;
    private readonly IRepository<OperateHistory, Guid> _operateHistory;
    private readonly IDataFilter dataFilter;
    private readonly IChannelFilter _channelFilter;
    private readonly IAliPayApi _aliPayApi;
@@ -58,6 +59,7 @@
                          IRepository<LifePayPremium, Guid> lifePayPremiumRepository,
                          IRepository<LifePayIntroInfo, Guid> lifePayIntroInfoRepository,
                          IRepository<DallyStatistics, Guid> dallyStatisticsRepository,
                          IRepository<OperateHistory, Guid> operateHistory,
                          IAliPayApi aliPayApi,
                          IWxPayApi wxPayApi,
                          IOptions<WxPayOption> wxPayOptions,
@@ -82,6 +84,7 @@
        _lifePayAccount = lifePayAccount;
        this.dataFilter = dataFilter;
        _channelFilter = channelFilter;
        _operateHistory = operateHistory;
    }
    #region 查询
@@ -1208,7 +1211,7 @@
        #region 记录日志
        await PublishLifePayOrderHistoryEvent("退款", "退款", order.Id);
        await LifePayOrderHistory("退款", "退款", order.Id, (int)OperateHistoryTypeEnum.LifePayRefund);
        #endregion
@@ -1596,6 +1599,20 @@
        await _distributedEventBus.PublishAsync(recordEto, false);
    }
    private async Task LifePayOrderHistory(string operateContent, string operateName, Guid relationId, int? tableType = (int)OperateHistoryTypeEnum.LifePayRefund)
    {
        var operateHistory = new OperateHistory
        {
            CreatorName = CurrentUser.Name,
            OperateContent = operateName,
            OperateName = operateName,
            RelationId = relationId,
            TableType = tableType
        };
        await _operateHistory.InsertAsync(operateHistory);
    }
    /// <summary>
    /// 获取支付二维码
    /// </summary>
LifePayment/LifePayment.Domain.Shared/Enum/OperateHistory/OperateHistoryTypeEnum.cs
@@ -150,4 +150,8 @@
    LifePayOrder = 40,
    LifePayChannles = 42,
    [Description("退款操作日志")]
    LifePayRefund = 43,
}