From aa60cb4822d7c9a08981b55ae4f458305f48ccb9 Mon Sep 17 00:00:00 2001
From: hang <872297557@qq.com>
Date: Thu, 26 Dec 2024 15:23:12 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=97=A5=E5=BF=97=E5=B1=95?=
=?UTF-8?q?=E7=A4=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
IRaCIS.Core.Application/IRaCIS.Core.Application.xml | 7 +++++++
.../Service/Management/DTO/UserLogViewModel.cs | 2 +-
.../Triggers/AfterSaveTrigger/UserLogAfterTrigger.cs | 2 +-
IRaCIS.Core.Domain/Management/UserLog.cs | 3 +--
IRaCIS.Core.Infra.EFCore/Context/IRaCISDBContext.cs | 9 ---------
5 files changed, 10 insertions(+), 13 deletions(-)
diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
index 2b47e6139..f634ecdaa 100644
--- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
+++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
@@ -12033,6 +12033,13 @@
+
+
+ 删除表格问题标记
+
+
+
+
保存表格问题标记
diff --git a/IRaCIS.Core.Application/Service/Management/DTO/UserLogViewModel.cs b/IRaCIS.Core.Application/Service/Management/DTO/UserLogViewModel.cs
index 5220efd63..f48d548c6 100644
--- a/IRaCIS.Core.Application/Service/Management/DTO/UserLogViewModel.cs
+++ b/IRaCIS.Core.Application/Service/Management/DTO/UserLogViewModel.cs
@@ -27,7 +27,7 @@ namespace IRaCIS.Core.Application.ViewModel
public UserTypeEnum? OptUserTypeEnum { get; set; }
- public UserLogJsonObj JsonObj { get; set; }
+ public string JsonObj { get; set; }
public string IPRegion { get; set; }
}
diff --git a/IRaCIS.Core.Application/Triggers/AfterSaveTrigger/UserLogAfterTrigger.cs b/IRaCIS.Core.Application/Triggers/AfterSaveTrigger/UserLogAfterTrigger.cs
index e19a3012a..faf76a78d 100644
--- a/IRaCIS.Core.Application/Triggers/AfterSaveTrigger/UserLogAfterTrigger.cs
+++ b/IRaCIS.Core.Application/Triggers/AfterSaveTrigger/UserLogAfterTrigger.cs
@@ -41,7 +41,7 @@ namespace IRaCIS.Core.Application.Triggers.AfterSaveTrigger
}).FirstOrDefaultAsync();
- userlog.JsonObj = obj;
+ userlog.JsonObj = obj.ToJsonStr();
await _identityUserRepository.SaveChangesAsync();
}
diff --git a/IRaCIS.Core.Domain/Management/UserLog.cs b/IRaCIS.Core.Domain/Management/UserLog.cs
index 34f74b227..5bdc2ef35 100644
--- a/IRaCIS.Core.Domain/Management/UserLog.cs
+++ b/IRaCIS.Core.Domain/Management/UserLog.cs
@@ -27,7 +27,7 @@ public class UserLog : BaseAddAuditEntity
public string ActionUserName { get; set; }
[MaxLength]
- public UserLogJsonObj JsonObj { get; set; }
+ public string JsonObj { get; set; }
[Comment("被操作的对象 admin 修改张三信息 张三是被操作对象")]
@@ -66,7 +66,6 @@ public class UserLogJsonObj
public string DepartmentName { get; set; }
- [NotMapped]
public List UserRoleList { get; set; }
}
diff --git a/IRaCIS.Core.Infra.EFCore/Context/IRaCISDBContext.cs b/IRaCIS.Core.Infra.EFCore/Context/IRaCISDBContext.cs
index 634c11474..0bebe6d0a 100644
--- a/IRaCIS.Core.Infra.EFCore/Context/IRaCISDBContext.cs
+++ b/IRaCIS.Core.Infra.EFCore/Context/IRaCISDBContext.cs
@@ -63,15 +63,6 @@ public class IRaCISDBContext : DbContext
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
- modelBuilder.Entity(entity =>
- {
- entity.OwnsOne(x => x.JsonObj, ownedNavigationBuilder =>
- {
- ownedNavigationBuilder.ToJson();
- });
-
- });
-
modelBuilder.Entity(entity =>
{
// 使用部分加密值转换器,前 2 个字符不加密,方便模糊搜索