Infrastructure/OpenAuth.App/ServiceApp/Achievement/InsTifApp.cs

29 lines
826 B
C#

using Infrastructure;
using OpenAuth.App.BaseApp.Base;
using OpenAuth.App.Interface;
using OpenAuth.App.ServiceApp.request;
using OpenAuth.Repository;
using OpenAuth.Repository.Domain;
using SqlSugar;
namespace OpenAuth.App.ServiceApp.Achievement;
public class InsTifApp : SqlSugarBaseApp<InsTif, SugarDbContext>
{
public InsTifApp(ISugarUnitOfWork<SugarDbContext> unitWork, ISimpleClient<InsTif> repository,
IAuth auth) : base(unitWork, repository, auth)
{
}
public async Task<PageInfo<List<InsTif>>> Load(InsAishpQuery req)
{
RefAsync<int> total = 0;
var result = await Repository.AsQueryable()
.ToPageListAsync(req.page, req.limit, total);
return new PageInfo<List<InsTif>>
{
Items = result,
Total = total
};
}
}