Files
Yi.Admin/Yi.Framework.Net6/Yi.Framework.Service/RABC/LogService.cs

33 lines
973 B
C#
Raw Normal View History

2022-04-23 00:57:14 +08:00
using SqlSugar;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Yi.Framework.Interface;
2023-01-01 23:06:11 +08:00
using Yi.Framework.Interface.RABC;
using Yi.Framework.Model.RABC.Entitys;
2022-04-23 00:57:14 +08:00
using Yi.Framework.Repository;
2023-01-01 23:06:11 +08:00
using Yi.Framework.Service.Base;
2022-04-23 00:57:14 +08:00
2023-01-01 23:06:11 +08:00
namespace Yi.Framework.Service.RABC
2022-04-23 00:57:14 +08:00
{
2023-01-01 23:06:11 +08:00
public partial class LogService : BaseService<LogEntity>, ILogService
2022-04-23 00:57:14 +08:00
{
2023-01-01 23:06:11 +08:00
public LogService(IRepository<LogEntity> repository) : base(repository)
{
}
2022-04-23 00:57:14 +08:00
public async Task<List<long>> AddListTest(List<LogEntity> logEntities)
{
return await _repository._Db.Insertable(logEntities).SplitTable().ExecuteReturnSnowflakeIdListAsync();
}
public async Task<List<LogEntity>> GetListTest()
{
2023-01-01 23:06:11 +08:00
return await _repository._DbQueryable.SplitTable(tas =>
tas.Where(u => u.TableName.Contains("2020") || u.TableName.Contains("2021"))
).ToListAsync();
2022-04-23 00:57:14 +08:00
}
}
}