|
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Threading.Tasks;
|
|
|
|
+using Hotline.Caching.Interfaces;
|
|
using Hotline.CallCenter.Calls;
|
|
using Hotline.CallCenter.Calls;
|
|
using Hotline.Orders;
|
|
using Hotline.Orders;
|
|
using Hotline.Realtimes;
|
|
using Hotline.Realtimes;
|
|
@@ -12,6 +13,7 @@ using Microsoft.Extensions.DependencyInjection;
|
|
using Microsoft.Extensions.Hosting;
|
|
using Microsoft.Extensions.Hosting;
|
|
using Microsoft.Extensions.Logging;
|
|
using Microsoft.Extensions.Logging;
|
|
using SqlSugar;
|
|
using SqlSugar;
|
|
|
|
+using XF.Domain.Constants;
|
|
using XF.Domain.Repository;
|
|
using XF.Domain.Repository;
|
|
|
|
|
|
namespace Hotline.Application.Bigscreen
|
|
namespace Hotline.Application.Bigscreen
|
|
@@ -41,6 +43,7 @@ namespace Hotline.Application.Bigscreen
|
|
var orderRepository = scope.ServiceProvider.GetRequiredService<IOrderRepository>();
|
|
var orderRepository = scope.ServiceProvider.GetRequiredService<IOrderRepository>();
|
|
var callRepository = scope.ServiceProvider.GetRequiredService<IRepository<TrCallRecord>>();
|
|
var callRepository = scope.ServiceProvider.GetRequiredService<IRepository<TrCallRecord>>();
|
|
var logger = scope.ServiceProvider.GetRequiredService<ILogger<BigscreenDataShowRefreshService>>();
|
|
var logger = scope.ServiceProvider.GetRequiredService<ILogger<BigscreenDataShowRefreshService>>();
|
|
|
|
+ var systemSettingCacheManager = scope.ServiceProvider.GetRequiredService<ISystemSettingCacheManager>();
|
|
|
|
|
|
while (!stoppingToken.IsCancellationRequested)
|
|
while (!stoppingToken.IsCancellationRequested)
|
|
{
|
|
{
|
|
@@ -48,6 +51,7 @@ namespace Hotline.Application.Bigscreen
|
|
var today = now.Date;
|
|
var today = now.Date;
|
|
var month = now.Month;
|
|
var month = now.Month;
|
|
var secRange = (now - _lastModifyTime).TotalSeconds;
|
|
var secRange = (now - _lastModifyTime).TotalSeconds;
|
|
|
|
+ int times = int.Parse(systemSettingCacheManager.GetSetting(SettingConstants.BsDataShowChangedTimes)?.SettingValue[0]);
|
|
|
|
|
|
if (secRange >= 10)
|
|
if (secRange >= 10)
|
|
{
|
|
{
|
|
@@ -80,7 +84,7 @@ namespace Hotline.Application.Bigscreen
|
|
_lastModifyTime = DateTime.Now;
|
|
_lastModifyTime = DateTime.Now;
|
|
}
|
|
}
|
|
|
|
|
|
- await Task.Delay(10000, stoppingToken);
|
|
|
|
|
|
+ await Task.Delay(times, stoppingToken);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|