Explorar o código

!544 配置用户机构范围过滤器,多租户(库隔离)场景下,业务表不会添加TenantAttribute特性
Merge pull request !544 from 陈龙/local-dev

zuohuaijun %!s(int64=3) %!d(string=hai) anos
pai
achega
ab15dbc3e7
Modificáronse 1 ficheiros con 1 adicións e 2 borrados
  1. 1 2
      Admin.NET/Admin.NET.Core/SqlSugar/SqlSugarFilter.cs

+ 1 - 2
Admin.NET/Admin.NET.Core/SqlSugar/SqlSugarFilter.cs

@@ -117,8 +117,7 @@ public static class SqlSugarFilter
             {
                 // 排除非当前数据库实体
                 var tAtt = entityType.GetCustomAttribute<TenantAttribute>();
-                if ((tAtt != null && db.CurrentConnectionConfig.ConfigId.ToString() != tAtt.configId.ToString()) ||
-                    (tAtt == null && db.CurrentConnectionConfig.ConfigId.ToString() != SqlSugarConst.ConfigId))
+                if ((tAtt != null && db.CurrentConnectionConfig.ConfigId.ToString() != tAtt.configId.ToString()))
                     continue;
 
                 var lambda = DynamicExpressionParser.ParseLambda(new[] {