This commit is contained in:
sunkaixuan 2025-03-19 11:56:54 +08:00
parent d41dd82a81
commit 15f6717508
5 changed files with 10 additions and 10 deletions

View File

@ -40,7 +40,7 @@ namespace SqlSugar
_Filters.RemoveAll(it => it.FilterName == filterName);
}
public List<SqlFilterItem> GeFilterList
public List<SqlFilterItem> GetFilterList
{
get
{

View File

@ -1797,9 +1797,9 @@ namespace SqlSugar
protected void _Filter(string FilterName, bool isDisabledGobalFilter)
{
QueryBuilder.IsDisabledGobalFilter = isDisabledGobalFilter;
if (this.Context.QueryFilter.GeFilterList.HasValue() && FilterName.HasValue())
if (this.Context.QueryFilter.GetFilterList.HasValue() && FilterName.HasValue())
{
var list = this.Context.QueryFilter.GeFilterList.Where(it => it.FilterName == FilterName && it.IsJoinQuery == !QueryBuilder.IsSingle());
var list = this.Context.QueryFilter.GetFilterList.Where(it => it.FilterName == FilterName && it.IsJoinQuery == !QueryBuilder.IsSingle());
foreach (var item in list)
{
var filterResult = item.FilterValue(this.Context);

View File

@ -312,9 +312,9 @@ namespace SqlSugar
var db = Context;
BindingFlags flag = BindingFlags.Instance | BindingFlags.NonPublic| BindingFlags.Public;
var index = 0;
if (db.QueryFilter.GeFilterList != null)
if (db.QueryFilter.GetFilterList != null)
{
foreach (var item in db.QueryFilter.GeFilterList)
foreach (var item in db.QueryFilter.GetFilterList)
{
if (this.RemoveFilters != null && this.RemoveFilters.Length > 0)
{
@ -384,9 +384,9 @@ namespace SqlSugar
public virtual void AppendFilter()
{
if (!IsDisabledGobalFilter && this.Context.QueryFilter.GeFilterList.HasValue())
if (!IsDisabledGobalFilter && this.Context.QueryFilter.GetFilterList.HasValue())
{
var gobalFilterList = this.Context.QueryFilter.GeFilterList.Where(it => it.FilterName.IsNullOrEmpty()).ToList();
var gobalFilterList = this.Context.QueryFilter.GetFilterList.Where(it => it.FilterName.IsNullOrEmpty()).ToList();
if (this.RemoveFilters != null && this.RemoveFilters.Length > 0)
{
gobalFilterList = gobalFilterList.Where(it => !this.RemoveFilters.Contains(it.type)).ToList();

View File

@ -49,8 +49,8 @@ namespace SqlSugar
BindingFlags flag = BindingFlags.Instance | BindingFlags.NonPublic;
Type type = this.Context.SubTableType;
var isWhere = HasWhere;
if (db.QueryFilter.GeFilterList != null) {
foreach (var item in db.QueryFilter.GeFilterList)
if (db.QueryFilter.GetFilterList != null) {
foreach (var item in db.QueryFilter.GetFilterList)
{
PropertyInfo field = item.GetType().GetProperty("exp", flag);
if (field != null)

View File

@ -9,6 +9,6 @@ namespace SqlSugar
{
IFilter Add(SqlFilterItem filter);
void Remove(string filterName);
List<SqlFilterItem> GeFilterList { get; }
List<SqlFilterItem> GetFilterList { get; }
}
}