Bläddra i källkod

对租户的表,如果其 configID 是默认的 SqlSugarConst.MainConfigId 的话,也是本配置的实体。

hwjmyz 1 år sedan
förälder
incheckning
394fca7802
1 ändrade filer med 1 tillägg och 1 borttagningar
  1. 1 1
      Admin.NET/Admin.NET.Core/SqlSugar/SqlSugarSetup.cs

+ 1 - 1
Admin.NET/Admin.NET.Core/SqlSugar/SqlSugarSetup.cs

@@ -455,7 +455,7 @@ public static class SqlSugarSetup
             case SqlSugarConst.MainConfigId:
                 return entityType.GetCustomAttributes<SysTableAttribute>().Any() ||
                        (!entityType.GetCustomAttributes<LogTableAttribute>().Any() &&
-                        !entityType.GetCustomAttributes<TenantAttribute>().Any());
+                        !entityType.GetCustomAttributes<TenantAttribute>().Any(o => o.configId.ToString() != config.ConfigId.ToString()));
 
             case SqlSugarConst.LogConfigId:
                 return entityType.GetCustomAttributes<LogTableAttribute>().Any();