Преглед изворни кода

修复实体类间接继承EntityBaseData时,个人数据范围无效BUG

林海波 пре 3 година
родитељ
комит
7e9e662556
1 измењених фајлова са 2 додато и 2 уклоњено
  1. 2 2
      Admin.NET/Admin.NET.Core/SqlSugar/SqlSugarFilter.cs

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

@@ -29,7 +29,7 @@ public static class SqlSugarFilter
 
             // 获取业务实体数据表
             var entityTypes = App.EffectiveTypes.Where(u => !u.IsInterface && !u.IsAbstract && u.IsClass
-                && u.BaseType == typeof(EntityBaseData));
+                && u.IsSubclassOf(typeof(EntityBaseData)));
             if (!entityTypes.Any()) return;
 
             orgFilter = new ConcurrentDictionary<Type, LambdaExpression>();
@@ -75,7 +75,7 @@ public static class SqlSugarFilter
         {
             // 获取业务实体数据表
             var entityTypes = App.EffectiveTypes.Where(u => !u.IsInterface && !u.IsAbstract && u.IsClass
-                && u.BaseType == typeof(EntityBaseData));
+                && u.IsSubclassOf(typeof(EntityBaseData)));
             if (!entityTypes.Any()) return maxDataScope;
 
             dataScopeFilter = new ConcurrentDictionary<Type, LambdaExpression>();