You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
1.2 KiB

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<SysLogOp>
{
private ISqlSugarClient DbBaseClient;
public SysLogOpRepository(ISqlSugarClient sqlSugar) : base(sqlSugar)
{
DbBaseClient = sqlSugar;
}
public async Task<List<SysLogOp>> SysLogOpQueryPageAsync(
bool isWhere1, Expression<Func<SysLogOp, bool>> expression1,bool isWhere2, Expression<Func<SysLogOp, bool>> expression2,
int pageNumber, int pageSize, RefAsync<int> totalNumber, PageLogReq input,bool blUseNoLock = false)
{
var page = await DbBaseClient
.Queryable<SysLogOp>()
.WhereIF(isWhere1, expression1)
.WhereIF(isWhere2, expression2)
.OrderBuilder(input)
.WithNoLockOrNot(blUseNoLock)
.ToPageListAsync(pageNumber, pageSize, totalNumber);
return page;
}
}
}