|
@@ -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)
|