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

6 months ago
using Entity.DbModel.System.SysBaseObject;
using Entity.Dto.Req;
6 months ago
using HybirdFrameworkCore.Autofac.Attribute;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
6 months ago
using System.Text;
using System.Threading.Tasks;
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;
}
6 months ago
}
}