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.

38 lines
1.2 KiB

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