diff --git a/ds-wms-service/DS.Module.SqlSugar/SqlsugarHelper.cs b/ds-wms-service/DS.Module.SqlSugar/SqlsugarHelper.cs index fa62ee78..824b295e 100644 --- a/ds-wms-service/DS.Module.SqlSugar/SqlsugarHelper.cs +++ b/ds-wms-service/DS.Module.SqlSugar/SqlsugarHelper.cs @@ -9,7 +9,7 @@ namespace DS.Module.SqlSugar { #region 新增操作 + InsertByObjectForSqlsugar - /// + /// /// 新增操作 /// /// @@ -57,7 +57,7 @@ namespace DS.Module.SqlSugar entityInfo.SetValue(user.OrgId); } - if (entityInfo.PropertyName == "CreateBy" && entityInfo.EntityValue == null) + if (entityInfo.PropertyName == "CreateBy" && (entityInfo.EntityValue == null || Equals(entityInfo.EntityValue, 0))) { if (!user.UserId.IsNullOrEmpty()) { @@ -112,7 +112,7 @@ namespace DS.Module.SqlSugar #region 加载配置文件 + ReturnConnectionConfig - public static List ReturnConnectionConfig(List dbList,ICacheService cache) + public static List ReturnConnectionConfig(List dbList, ICacheService cache) { var connectConfigList = new List(); @@ -149,6 +149,6 @@ namespace DS.Module.SqlSugar #endregion 加载配置文件 + ReturnConnectionConfig - + } } \ No newline at end of file diff --git a/ds-wms-service/DS.Module.SqlSugar/SqlsugarInstall.cs b/ds-wms-service/DS.Module.SqlSugar/SqlsugarInstall.cs index b404ff77..b8226c08 100644 --- a/ds-wms-service/DS.Module.SqlSugar/SqlsugarInstall.cs +++ b/ds-wms-service/DS.Module.SqlSugar/SqlsugarInstall.cs @@ -192,7 +192,7 @@ public static class SqlsugarInstall entityInfo.SetValue(user.OrgId); } - if (entityInfo.PropertyName == "CreateBy" && entityInfo.EntityValue == null) + if (entityInfo.PropertyName == "CreateBy" && (entityInfo.EntityValue == null || Equals(entityInfo.EntityValue, 0))) { if (!user.UserId.IsNullOrEmpty()) {