using Infrastructure.Attribute; using ZR.Model; using ZR.Service; using ZR.ServiceCore.Model; using ZR.ServiceCore.Services.IService; namespace ZR.ServiceCore.Services; [AppService(ServiceType = typeof(IIpRateLimitLogService), ServiceLifetime = LifeTime.Transient)] public class IpRateLimitLogService : BaseService, IIpRateLimitLogService { public void InsertIpRateLimitLogAsync(IpRateLimitLog ipRateLimitLog) { Insertable(ipRateLimitLog).ExecuteReturnSnowflakeId(); } public async Task> SelectIpRateLimitLogPageAsync(IpRateLimitLog ipRateLimitLog, PagerInfo pager) { RefAsync total = 0; var res = await Queryable() .ToPageListAsync(pager.PageNum, pager.PageSize, total); var page = new PagedInfo { PageSize = pager.PageSize, PageIndex = pager.PageNum, Result = res, TotalNum = total }; return page; } }