From c2ff291b6f7c747e171d2d2155282c310503d169 Mon Sep 17 00:00:00 2001
From: zhengyuxuan <zhengyuxuan1995>
Date: 星期四, 20 三月 2025 18:19:05 +0800
Subject: [PATCH] fix:新增日志
---
LifePayment/LifePayment.Domain.Shared/Enum/OperateHistory/OperateHistoryTypeEnum.cs | 4 ++++
LifePayment/LifePayment.Application/LifePay/LifePayService.cs | 19 ++++++++++++++++++-
2 files changed, 22 insertions(+), 1 deletions(-)
diff --git a/LifePayment/LifePayment.Application/LifePay/LifePayService.cs b/LifePayment/LifePayment.Application/LifePay/LifePayService.cs
index b10cf07..00a0bf7 100644
--- a/LifePayment/LifePayment.Application/LifePay/LifePayService.cs
+++ b/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>
diff --git a/LifePayment/LifePayment.Domain.Shared/Enum/OperateHistory/OperateHistoryTypeEnum.cs b/LifePayment/LifePayment.Domain.Shared/Enum/OperateHistory/OperateHistoryTypeEnum.cs
index d96037a..798b61b 100644
--- a/LifePayment/LifePayment.Domain.Shared/Enum/OperateHistory/OperateHistoryTypeEnum.cs
+++ b/LifePayment/LifePayment.Domain.Shared/Enum/OperateHistory/OperateHistoryTypeEnum.cs
@@ -150,4 +150,8 @@
LifePayOrder = 40,
LifePayChannles = 42,
+
+
+ [Description("閫�娆炬搷浣滄棩蹇�")]
+ LifePayRefund = 43,
}
--
Gitblit v1.9.1