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.3 KiB
37 lines
1.3 KiB
using Entity.DbModel.System.SysBaseObject;
|
|
using Entity.Dto.Req;
|
|
using HybirdFrameworkCore.Autofac.Attribute;
|
|
using SqlSugar;
|
|
using System.Linq.Expressions;
|
|
|
|
namespace Repository.System
|
|
{
|
|
[Scope("SingleInstance")]
|
|
public class SysConfigRepository : BaseRepository<SysConfig>
|
|
{
|
|
private ISqlSugarClient DbBaseClient;
|
|
public SysConfigRepository(ISqlSugarClient sqlSugar) : base(sqlSugar)
|
|
{
|
|
DbBaseClient = sqlSugar;
|
|
}
|
|
|
|
public async Task<List<SysConfig>> SysConfigQueryPageAsync(
|
|
bool isWhere1, Expression<Func<SysConfig, bool>> expression1,
|
|
bool isWhere2, Expression<Func<SysConfig, bool>> expression2,
|
|
bool isWhere3, Expression<Func<SysConfig, bool>> expression3,
|
|
int pageNumber, int pageSize, RefAsync<int> totalNumber,
|
|
PageConfigReq input, bool blUseNoLock = false)
|
|
{
|
|
var page = await DbBaseClient
|
|
.Queryable<SysConfig>()
|
|
.WhereIF(isWhere1, expression1)
|
|
.WhereIF(isWhere2, expression2)
|
|
.WhereIF(isWhere3, expression3)
|
|
.OrderBuilder(input)
|
|
.WithNoLockOrNot(blUseNoLock)
|
|
.ToPageListAsync(pageNumber, pageSize, totalNumber);
|
|
return page;
|
|
}
|
|
}
|
|
}
|