using Entity.DbModel.System.SysBaseObject; using Entity.Dto.Req; using HybirdFrameworkCore.Autofac.Attribute; using SqlSugar; using System; using System.Collections.Generic; using System.Linq; using System.Linq.Expressions; using System.Text; using System.Threading.Tasks; namespace Repository.System { [Scope("SingleInstance")] public class SysLogOpRepository : BaseRepository { private ISqlSugarClient DbBaseClient; public SysLogOpRepository(ISqlSugarClient sqlSugar) : base(sqlSugar) { DbBaseClient = sqlSugar; } public async Task> SysLogOpQueryPageAsync( bool isWhere1, Expression> expression1,bool isWhere2, Expression> expression2, int pageNumber, int pageSize, RefAsync totalNumber, PageLogReq input,bool blUseNoLock = false) { var page = await DbBaseClient .Queryable() .WhereIF(isWhere1, expression1) .WhereIF(isWhere2, expression2) .OrderBuilder(input) .WithNoLockOrNot(blUseNoLock) .ToPageListAsync(pageNumber, pageSize, totalNumber); return page; } } }