瀏覽代碼

修改旧数据附件

tangjiang 7 月之前
父節點
當前提交
ec4775ec14

+ 0 - 1
src/Hotline.Api/config/appsettings.Development.json

@@ -33,7 +33,6 @@
   },
   "AllowedHosts": "*",
   "AppConfiguration": {
-    "OldFilesUrls": "http://12345.zwfwhfgjjfzj.yibin.gov.cn:81",
     "AppScope": "ZiGong",
     "YiBin": {
       "CallCenterType": "TianRun", //XunShi、WeiErXin、TianRun、XingTang

+ 8 - 5
src/Hotline.Application/Bulletin/BulletinApplication.cs

@@ -1,4 +1,6 @@
-using Hotline.Configurations;
+using Hotline.Caching.Interfaces;
+using Hotline.Configurations;
+using Hotline.Settings;
 using Microsoft.Extensions.Options;
 using System.Text;
 using System.Text.RegularExpressions;
@@ -9,10 +11,13 @@ namespace Hotline.Application.Bulletin
     public class BulletinApplication : IBulletinApplication, IScopeDependency
     {
         private readonly IOptionsSnapshot<AppConfiguration> _appOptions;
+        private readonly ISystemSettingCacheManager _systemSettingCacheManager;
 
-        public BulletinApplication(IOptionsSnapshot<AppConfiguration> appOptions)
+        public BulletinApplication(IOptionsSnapshot<AppConfiguration> appOptions,
+                 ISystemSettingCacheManager systemSettingCacheManager)
         {
             _appOptions = appOptions;
+            _systemSettingCacheManager= systemSettingCacheManager; 
         }
 
         /// <summary>
@@ -37,9 +42,7 @@ namespace Hotline.Application.Bulletin
             // 搜索匹配的字符串
             MatchCollection matchesvideo = regvideo.Matches(sHtmlText);
 
-
-            // 获取服务器地址配置 
-            string strSiteUrl = _appOptions.Value.OldFilesUrls;
+            var strSiteUrl = _systemSettingCacheManager.GetSetting(SettingConstants.OldFilesUrls)?.SettingValue[0];
          
             // 取得匹配项列表 视频
             foreach (Match match in matchesvideo)

+ 5 - 0
src/Hotline/Settings/SettingConstants.cs

@@ -517,5 +517,10 @@ namespace Hotline.Settings
             { "4", $"不满意|{EVisitState.SMSUnsatisfied}|{ESeatEvaluate.NoSatisfied}|{EVoiceEvaluate.NoSatisfied}|2"},
             { "5", $"非常不满意|{EVisitState.SMSUnsatisfied}|{ESeatEvaluate.NoSatisfied}|{EVoiceEvaluate.VeryNoSatisfied}|2"},
         };
+
+        /// <summary>
+        /// 旧数据通知公告知识库附件地址	
+        /// </summary>
+        public const string OldFilesUrls = "OldFilesUrls";
     }
 }