|
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
|
|
using System.Linq;
|
|
|
using System.Text;
|
|
|
using System.Threading.Tasks;
|
|
|
+using Hotline.Caches;
|
|
|
using Hotline.CallCenter.BlackLists;
|
|
|
using Hotline.Settings;
|
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
@@ -29,25 +30,8 @@ namespace Hotline.Application.Systems
|
|
|
protected override async Task ExecuteAsync(CancellationToken stoppingToken)
|
|
|
{
|
|
|
using var scope = _serviceScopeFactory.CreateScope();
|
|
|
- var repository = scope.ServiceProvider.GetRequiredService<ITableAccessLevelRepository>();
|
|
|
- var cache = scope.ServiceProvider.GetRequiredService<ITypedCache<IReadOnlyList<TableAccessLevel>>>();
|
|
|
- //var accesses = repository.Queryable()
|
|
|
- // .Select()
|
|
|
-
|
|
|
- /*
|
|
|
- * db.Queryable<Order>().Select(it => new
|
|
|
- {
|
|
|
- index2 = SqlFunc.RowNumber(it.Id,it.Name),//order by id partition by name
|
|
|
- //多字段排序 order by id asc ,name desc
|
|
|
- //SqlFunc.RowNumber($"{it.Id} asc ,{it.Name} desc ",$"{it.Name}")
|
|
|
- price=it.Price,
|
|
|
- date=it.CreateTime
|
|
|
- })
|
|
|
- .MergeTable()//将结果合并成一个表
|
|
|
- .Where(it=>it.index2==1)
|
|
|
- //前10条用Where(it=>it.index2=<=20)
|
|
|
- .ToList();
|
|
|
- */
|
|
|
+ var cache = scope.ServiceProvider.GetRequiredService<ITableAccessLevelCacheManager>();
|
|
|
+ cache.Reload();
|
|
|
}
|
|
|
}
|
|
|
}
|