From 27315fd483d4873bcc6c81b6c413d496b0c2bbaf Mon Sep 17 00:00:00 2001 From: xiaochanghai Date: Mon, 15 Apr 2024 16:45:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E7=B2=BE=E7=AE=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Tiobon.Core.Common/DB/Aop/SqlsugarAop.cs | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/Tiobon.Core.Common/DB/Aop/SqlsugarAop.cs b/Tiobon.Core.Common/DB/Aop/SqlsugarAop.cs index 9bdba2ff..60828b88 100644 --- a/Tiobon.Core.Common/DB/Aop/SqlsugarAop.cs +++ b/Tiobon.Core.Common/DB/Aop/SqlsugarAop.cs @@ -39,38 +39,25 @@ public static class SqlSugarAop public static void DataExecuting(object oldValue, DataFilterModel entityInfo) { if (entityInfo.EntityValue is RootEntityTkey rootEntity) - { if (rootEntity.Id == 0) - { rootEntity.Id = SnowFlakeSingle.Instance.NextId(); - } - } if (entityInfo.EntityValue is BaseEntity baseEntity) { // 新增操作 if (entityInfo.OperationType == DataFilterType.InsertByObject) - { if (baseEntity.CreateTime == DateTime.MinValue) - { baseEntity.CreateTime = DateTime.Now; - } - } if (entityInfo.OperationType == DataFilterType.UpdateByObject) - { baseEntity.ModifyTime = DateTime.Now; - } - if (App.User?.ID > 0) { if (baseEntity is ITenantEntity tenant && App.User.TenantId > 0) { if (tenant.TenantId == 0) - { tenant.TenantId = App.User.TenantId; - } } switch (entityInfo.OperationType)