Files
coreshoppro/CoreCms.Net.Configuration/AppSettingsConstVars.cs
大灰灰 7d49668037 【新增】增加MySql.Data组件,防止出现Nlog新版mysql不写入的问题。
【优化】优化本地上传写入文件夹缺少反斜杠的问题。
【修复】修复appsetting.json微信公众号配置项命名错误的问题。
【新增】定时任务增加微信公众号获取JS-Token并且全局缓存功能。
【新增】增加微信公众号获取JS-SDK使用权限签名算法。
【新增】新增微信公众号【微信被动回复消息】功能,用于关于公众号提醒,微信聊天被动关键词回复等。
【新增】新增微信公众号【微信菜单管理】功能,用于管理公众号底部三列五横的链接。
【新增】新增微信公众号【消息推送】接口及业务处理。用于接收从微信公众号推送的事件交互。
【新增】新增微信公众号【授权鉴权跳转】功能,用于验证是否为微信公众号访问,及获取openid等信息。
【新增】新增微信公众号用户accressToekn存储机制。
【新增】新增微信公众号发送模板消息方法。
【新增】数据库新增【WeChatMessageResponse】【WeChatUserAccessToken】两个表,【CoreCmsUserWeChatInfo】增加【isSubscribe】是否关注字段。
【新增】商品品牌管理品牌logo增加原图上传 
【新增】商品分类管理分类图片增加原图上传
【新增】新增最新后台左侧管理菜单目录脚本,完整数据库脚本备份新增最新商品商品示例。
2022-12-30 02:32:10 +08:00

182 lines
8.3 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using SqlSugar.Extensions;
namespace CoreCms.Net.Configuration
{
/// <summary>
/// 配置文件格式化
/// </summary>
public static class AppSettingsConstVars
{
#region ================================================================================
/// <summary>
/// 系统后端地址
/// </summary>
public static readonly string AppConfigAppUrl = AppSettingsHelper.GetContent("AppConfig", "AppUrl");
/// <summary>
/// PC端地址
/// </summary>
public static readonly string AppConfigAppPcUrl = AppSettingsHelper.GetContent("AppConfig", "AppPcUrl");
/// <summary>
/// H5端地址
/// </summary>
public static readonly string AppConfigAppH5Url = AppSettingsHelper.GetContent("AppConfig", "AppH5Url");
/// <summary>
/// 系统接口地址
/// </summary>
public static readonly string AppConfigAppInterFaceUrl = AppSettingsHelper.GetContent("AppConfig", "AppInterFaceUrl");
#endregion
#region ================================================================================
/// <summary>
/// 获取数据库连接字符串
/// </summary>
public static readonly string DbSqlConnection = AppSettingsHelper.GetContent("ConnectionStrings", "SqlConnection");
/// <summary>
/// 获取数据库类型
/// </summary>
public static readonly string DbDbType = AppSettingsHelper.GetContent("ConnectionStrings", "DbType");
#endregion
#region redis================================================================================
/// <summary>
/// 获取redis连接字符串
/// </summary>
public static readonly string RedisConfigConnectionString = AppSettingsHelper.GetContent("RedisConfig", "ConnectionString");
/// <summary>
/// 启用redis作为缓存选择
/// </summary>
public static readonly bool RedisUseCache = AppSettingsHelper.GetContent("RedisConfig", "UseCache").ObjToBool();
/// <summary>
/// 启用redis作为定时任务
/// </summary>
public static readonly bool RedisUseTimedTask = AppSettingsHelper.GetContent("RedisConfig", "UseTimedTask").ObjToBool();
#endregion
#region AOP================================================================================
/// <summary>
/// 事务切面开关
/// </summary>
public static readonly bool TranAopEnabled = AppSettingsHelper.GetContent("TranAOP", "Enabled").ObjToBool();
#endregion
#region Jwt授权配置================================================================================
public static readonly string JwtConfigSecretKey = AppSettingsHelper.GetContent("JwtConfig", "SecretKey");
public static readonly string JwtConfigIssuer = AppSettingsHelper.GetContent("JwtConfig", "Issuer");
public static readonly string JwtConfigAudience = AppSettingsHelper.GetContent("JwtConfig", "Audience");
#endregion
#region Cors跨域设置================================================================================
public static readonly string CorsPolicyName = AppSettingsHelper.GetContent("Cors", "PolicyName");
public static readonly bool CorsEnableAllIPs = AppSettingsHelper.GetContent("Cors", "EnableAllIPs").ObjToBool();
public static readonly string CorsIPs = AppSettingsHelper.GetContent("Cors", "IPs");
#endregion
#region Middleware中间件================================================================================
/// <summary>
/// 是否记录ip信息
/// </summary>
public static readonly bool MiddlewareIpLogEnabled = AppSettingsHelper.GetContent("Middleware", "IPLog", "Enabled").ObjToBool();
/// <summary>
/// 是否开启IP限流
/// </summary>
public static readonly bool MiddlewareIpRateLimitEnabled = AppSettingsHelper.GetContent("Middleware", "IpRateLimit", "Enabled").ObjToBool();
/// <summary>
/// 记录请求与返回数据
/// </summary>
public static readonly bool MiddlewareRequestResponseLogEnabled = AppSettingsHelper.GetContent("Middleware", "RequestResponseLog", "Enabled").ObjToBool();
/// <summary>
/// 用户访问记录-是否开启
/// </summary>
public static readonly bool MiddlewareRecordAccessLogsEnabled = AppSettingsHelper.GetContent("Middleware", "RecordAccessLogs", "Enabled").ObjToBool();
/// <summary>
/// 用户访问记录-过滤ip
/// </summary>
public static readonly string MiddlewareRecordAccessLogsIgnoreApis = AppSettingsHelper.GetContent("Middleware", "RecordAccessLogs", "IgnoreApis");
/// <summary>
/// 是否开启记录到文件模式
/// </summary>
public static readonly bool MiddlewareRecordAccessLogsEnabledFileMode = AppSettingsHelper.GetContent("Middleware", "RecordAccessLogs", "EnabledFileMode").ObjToBool();
/// <summary>
/// 是否开启记录到数据库模式
/// </summary>
public static readonly bool MiddlewareRecordAccessLogsEnabledDbMode = AppSettingsHelper.GetContent("Middleware", "RecordAccessLogs", "EnabledDbMode").ObjToBool();
/// <summary>
/// 并发限制(最大并发请求数)
/// </summary>
public static readonly int MiddlewareConcurrencyLimiterMaxConcurrentRequests = AppSettingsHelper.GetContent("Middleware", "ConcurrencyLimiter", "MaxConcurrentRequests").ObjToInt(100);
/// <summary>
/// 并发限制(最大请求数)
/// </summary>
public static readonly int MiddlewareConcurrencyLimiterRequestQueueLimit = AppSettingsHelper.GetContent("Middleware", "ConcurrencyLimiter", "RequestQueueLimit").ObjToInt(100);
#endregion
#region ================================================================================
/// <summary>
/// 微信支付回调
/// </summary>
public static readonly string PayCallBackWeChatPayUrl = AppSettingsHelper.GetContent("PayCallBack", "WeChatPayUrl");
/// <summary>
/// 微信退款回调
/// </summary>
public static readonly string PayCallBackWeChatRefundUrl = AppSettingsHelper.GetContent("PayCallBack", "WeChatRefundUrl");
/// <summary>
/// 支付宝支付回调
/// </summary>
public static readonly string PayCallBackAlipayUrl = AppSettingsHelper.GetContent("PayCallBack", "AlipayUrl");
/// <summary>
/// 支付宝退款回调
/// </summary>
public static readonly string PayCallBackAlipayRefundUrl = AppSettingsHelper.GetContent("PayCallBack", "AlipayRefundUrl");
#endregion
#region HangFire定时任务================================================================================
/// <summary>
/// 登录账号
/// </summary>
public static readonly string HangFireLogin = AppSettingsHelper.GetContent("HangFire", "Login");
/// <summary>
/// 登录密码
/// </summary>
public static readonly string HangFirePassWord = AppSettingsHelper.GetContent("HangFire", "PassWord");
#endregion
#region ================================================================================
/// <summary>
/// 微信小程序WxOpenAppSecret
/// </summary>
public static readonly string WxOpenAppId = AppSettingsHelper.GetContent("WeChatOptions", "WxOpenAppId");
/// <summary>
/// 微信小程序WxOpenAppSecret
/// </summary>
public static readonly string WxOpenAppSecret = AppSettingsHelper.GetContent("WeChatOptions", "WxOpenAppSecret");
/// <summary>
/// 微信公众号WeiXinAppId
/// </summary>
public static readonly string WeiXinAppId = AppSettingsHelper.GetContent("WeChatOptions", "WeiXinAppId");
/// <summary>
/// 微信公众号WeiXinAppSecret
/// </summary>
public static readonly string WeiXinAppSecret = AppSettingsHelper.GetContent("WeChatOptions", "WeiXinAppSecret");
#endregion
}
}