[fix]修正字段缓存分组查询丢失groupby的问题

This commit is contained in:
智能大石头 2025-01-02 20:39:35 +08:00
parent e8ceea7a20
commit 45a836177a
1 changed files with 6 additions and 1 deletions

View File

@ -65,7 +65,12 @@ public class FieldCache<TEntity> : EntityCache<TEntity> where TEntity : Entity<T
}
}
private IList<TEntity> Search() => Entity<TEntity>.FindAll(Where?.GroupBy(_field), OrderBy, _Unique.Count("group_count")! & _field, 0, MaxRows);
private IList<TEntity> Search()
{
Expression? exp = Where?.GroupBy(_field);
exp ??= _field.GroupBy();
return Entity<TEntity>.FindAll(exp, OrderBy, _Unique.Count("group_count")! & _field, 0, MaxRows);
}
private IDictionary<String, String> GetAll()
{