Dun.Jason 1 년 전
부모
커밋
be9d3800a8
2개의 변경된 파일13개의 추가작업 그리고 1개의 파일을 삭제
  1. 5 1
      src/Hotline.Application/Bigscreen/BigscreenDataShowRefreshService.cs
  2. 8 0
      src/XF.Domain/Constants/SettingConstants.cs

+ 5 - 1
src/Hotline.Application/Bigscreen/BigscreenDataShowRefreshService.cs

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

+ 8 - 0
src/XF.Domain/Constants/SettingConstants.cs

@@ -115,5 +115,13 @@ namespace XF.Domain.Constants
         /// 呼入有效时间
         /// </summary>
         public const string EffectiveTimes = "EffectiveTimes";
+        /// <summary>
+        /// 大屏数据展示推送间隔时间
+        /// </summary>
+        public const string BsDataShowChangedTimes = "BsDataShowChangedTimes";
+        /// <summary>
+        /// 大屏坐席监控推送间隔时间
+        /// </summary>
+        public const string BsDataStateChangedTimes = "BsDataStateChangedTimes";
     }
 }