From fcd1b05a6fb51bb4edf528beb4f5b054f9e4d1ab Mon Sep 17 00:00:00 2001 From: sunkaixuan <610262374@qq.com> Date: Fri, 20 Jan 2023 15:10:25 +0800 Subject: [PATCH] Update golbal filter --- .../SqlSugar/Abstract/SqlBuilderProvider/QueryBuilder.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Src/Asp.NetCore2/SqlSugar/Abstract/SqlBuilderProvider/QueryBuilder.cs b/Src/Asp.NetCore2/SqlSugar/Abstract/SqlBuilderProvider/QueryBuilder.cs index 6916e5071..ab56d7f67 100644 --- a/Src/Asp.NetCore2/SqlSugar/Abstract/SqlBuilderProvider/QueryBuilder.cs +++ b/Src/Asp.NetCore2/SqlSugar/Abstract/SqlBuilderProvider/QueryBuilder.cs @@ -304,6 +304,14 @@ namespace SqlSugar { foreach (var item in db.QueryFilter.GeFilterList) { + if (this.RemoveFilters != null && this.RemoveFilters.Length > 0) + { + if (this.RemoveFilters.Contains(item.type)) + { + continue; + } + } + PropertyInfo field = item.GetType().GetProperty("exp", flag); if (field != null) {