mirror of
https://github.com/nsnail/NetAdmin.git
synced 2025-08-02 18:17:31 +08:00
24 lines
765 B
C#
24 lines
765 B
C#
using NetAdmin.Domain;
|
|
using NetAdmin.Domain.Dto.Dependency;
|
|
|
|
namespace NetAdmin.Application.Extensions;
|
|
|
|
/// <summary>
|
|
/// FreeSql Select 扩展方法
|
|
/// </summary>
|
|
public static class ISelectExtensions
|
|
{
|
|
/// <summary>
|
|
/// 附加其他过滤条件
|
|
/// </summary>
|
|
public static ISelect<T> AppendOtherFilters<T, TQuery>(this ISelect<T> me, QueryReq<TQuery> req)
|
|
where TQuery : DataAbstraction, new()
|
|
{
|
|
if (req.IgnoreOwner) {
|
|
me = me.DisableGlobalFilter(Chars.FLG_FREE_SQL_GLOBAL_FILTER_SELF, Chars.FLG_FREE_SQL_GLOBAL_FILTER_DEPT
|
|
, Chars.FLG_FREE_SQL_GLOBAL_FILTER_DEPT_WITH_CHILDREN, Chars.FLG_FREE_SQL_GLOBAL_FILTER_DEPT_WITH_SON);
|
|
}
|
|
|
|
return me;
|
|
}
|
|
} |