feat: 新增SDK模块、OSS相关功能并优化Redis与代码扩展
1. 新增API版本枚举SDK项,创建SDK基础控制器 2. 添加IList、string扩展方法,新增时间戳扩展工具 3. 新增OSS配置、STS凭证服务、文件处理相关代码 4. 重构Redis缓存组件,替换StackExchange.Redis为CSRedisCore 5. 修复原有Redis操作方法调用,新增基础控制器快捷返回方法 6. 新增阿里云OSS、短信、VOD相关SDK依赖 7. 配置阿里云OSS相关参数到appsettings
This commit is contained in:
@ -146,5 +146,22 @@ namespace QYZH.InteractiveMagazine.Common.Extensions
|
||||
|
||||
return Regex.IsMatch(input, pattern);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 判断字符串是否为Null、空
|
||||
/// </summary>
|
||||
/// <param name="s"></param>
|
||||
/// <returns></returns>
|
||||
public static bool IsNull(this string s)
|
||||
{
|
||||
return string.IsNullOrWhiteSpace(s);
|
||||
}
|
||||
|
||||
public static string RemoveDomain(this string str)
|
||||
{
|
||||
if (str.IsNull()) return str;
|
||||
// 匹配域名后的路径部分(包括第一个/)
|
||||
return Regex.Replace(str, @"https?://[^/]+/([^""\s<>]*)", "$1");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user