Browse Source

!715 修复实体类间接继承EntityBaseData时,个人数据范围无效BUG
Merge pull request !715 from 林海波/next

zuohuaijun 3 years ago
parent
commit
8d274dd2c1
1 changed files with 2 additions and 2 deletions
  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>();