😎1、修复win环境获取硬件错误 2、增加数据库连接字符串加密策略 3、增加用户接口权限缓存清除 4、增加国密SM2系统配置参数 5、升级依赖
This commit is contained in:
parent
c0e394db94
commit
73626e6884
@ -28,7 +28,8 @@
|
||||
"DbSettings": {
|
||||
"EnableInitDb": true, // 启用库初始化(若实体没有变化建议关闭)
|
||||
"EnableDiffLog": false, // 启用库表差异日志
|
||||
"EnableUnderLine": false // 启用驼峰转下划线
|
||||
"EnableUnderLine": false, // 启用驼峰转下划线
|
||||
"EnableConnEncrypt": false // 启用数据库连接串加密(国密SM2加解密)
|
||||
},
|
||||
"TableSettings": {
|
||||
"EnableInitTable": true, // 启用表初始化(若实体没有变化建议关闭)
|
||||
|
||||
@ -39,7 +39,7 @@
|
||||
<PackageReference Include="Novell.Directory.Ldap.NETStandard" Version="3.6.0" />
|
||||
<PackageReference Include="QRCoder" Version="1.6.0" />
|
||||
<PackageReference Include="RabbitMQ.Client" Version="7.0.0" />
|
||||
<PackageReference Include="SixLabors.ImageSharp.Web" Version="3.1.2" />
|
||||
<PackageReference Include="SixLabors.ImageSharp.Web" Version="3.1.3" />
|
||||
<PackageReference Include="SkiaSharp.NativeAssets.Linux.NoDependencies" Version="2.88.9" />
|
||||
<PackageReference Include="SKIT.FlurlHttpClient.Wechat.Api" Version="3.6.0" />
|
||||
<PackageReference Include="SKIT.FlurlHttpClient.Wechat.TenpayV3" Version="3.9.0" />
|
||||
@ -47,7 +47,7 @@
|
||||
<PackageReference Include="SSH.NET" Version="2024.2.0" />
|
||||
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.4.9" />
|
||||
<PackageReference Include="System.Net.Http" Version="4.3.4" />
|
||||
<PackageReference Include="TencentCloudSDK.Sms" Version="3.0.1125" />
|
||||
<PackageReference Include="TencentCloudSDK.Sms" Version="3.0.1126" />
|
||||
<PackageReference Include="UAParser" Version="3.1.47" />
|
||||
<PackageReference Include="Yitter.IdGenerator" Version="1.0.14" />
|
||||
</ItemGroup>
|
||||
|
||||
@ -86,6 +86,11 @@ public class ConfigConst
|
||||
/// </summary>
|
||||
public const string SysForceChangePassword = "sys_force_change_password";
|
||||
|
||||
/// <summary>
|
||||
/// 国密SM2密匙
|
||||
/// </summary>
|
||||
public const string SysSM2Key = "sys_sm2_key";
|
||||
|
||||
/// <summary>
|
||||
/// Default 分组
|
||||
/// </summary>
|
||||
|
||||
@ -32,8 +32,8 @@ public partial class SysConfig : EntityBase
|
||||
/// <summary>
|
||||
/// 属性值
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "属性值", Length = 64)]
|
||||
[MaxLength(64)]
|
||||
[SugarColumn(ColumnDescription = "属性值", Length = 256)]
|
||||
[MaxLength(256)]
|
||||
public string? Value { get; set; }
|
||||
|
||||
/// <summary>
|
||||
|
||||
@ -71,6 +71,11 @@ public sealed class DbSettings
|
||||
/// 启用驼峰转下划线
|
||||
/// </summary>
|
||||
public bool EnableUnderLine { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 启用数据库连接串加密策略
|
||||
/// </summary>
|
||||
public bool EnableConnEncrypt { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@ -34,6 +34,7 @@ public class SysConfigSeedData : ISqlSugarEntitySeedData<SysConfig>
|
||||
new SysConfig{ Id=1300000000221, Name="数据校验日志", Code=ConfigConst.SysValidationLog, Value="True", SysFlag=YesNoEnum.Y, Remark="是否数据校验日志", OrderNo=130, GroupCode=ConfigConst.SysDefaultGroup, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
|
||||
new SysConfig{ Id=1300000000231, Name="行政区域同步层级", Code=ConfigConst.SysRegionSyncLevel, Value="3", SysFlag=YesNoEnum.Y, Remark="行政区域同步层级 1-省级,2-市级,3-区县级,4-街道级,5-村级", OrderNo=140, GroupCode=ConfigConst.SysDefaultGroup, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
|
||||
new SysConfig{ Id=1300000000241, Name="开启强制修改密码", Code=ConfigConst.SysForceChangePassword, Value="False", SysFlag=YesNoEnum.Y, Remark="开启强制修改密码", OrderNo=150, GroupCode=ConfigConst.SysDefaultGroup, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
|
||||
new SysConfig{ Id=1300000000251, Name="国密SM2密匙", Code=ConfigConst.SysSM2Key, Value="04851D329AA3E38C2E7670AFE70E6E70E92F8769CA27C8766B12209A0FFBA4493B603EF7A0B9B1E16F0E8930C0406EA0B179B68DF28E25334BDEC4AE76D907E9E9;3A61D1D30C6302DABFF36201D936D0143EEF0C850AF28C5CA6D5C045AF8C5C8A", SysFlag=YesNoEnum.Y, Remark="国密SM2密匙", OrderNo=160, GroupCode=ConfigConst.SysDefaultGroup, CreateTime=DateTime.Parse("2024-11-21 00:00:00") },
|
||||
|
||||
new SysConfig{ Id=1300000000301, Name="系统主标题", Code=ConfigConst.SysWebTitle, Value="Admin.NET.Pro", SysFlag=YesNoEnum.Y, Remark="系统主标题", OrderNo=300, GroupCode=ConfigConst.SysWebConfigGroup, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
|
||||
new SysConfig{ Id=1300000000311, Name="系统副标题", Code=ConfigConst.SysWebViceTitle, Value="Admin.NET.Pro", SysFlag=YesNoEnum.Y, Remark="系统副标题", OrderNo=310, GroupCode=ConfigConst.SysWebConfigGroup, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
|
||||
|
||||
@ -59,6 +59,28 @@ public class SysCommonService : IDynamicApiController, ITransient
|
||||
return MD5Encryption.Encrypt(text, uppercase, is16: false);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 国密SM2加密字符串 🔖
|
||||
/// </summary>
|
||||
/// <param name="plainText"></param>
|
||||
/// <returns></returns>
|
||||
[DisplayName("国密SM2加密字符串")]
|
||||
public string SM2Encrypt([Required] string plainText)
|
||||
{
|
||||
return CryptogramUtil.SM2Encrypt(plainText);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 国密SM2解密字符串 🔖
|
||||
/// </summary>
|
||||
/// <param name="cipherText"></param>
|
||||
/// <returns></returns>
|
||||
[DisplayName("国密SM2解密字符串")]
|
||||
public string SM2Decrypt([Required] string cipherText)
|
||||
{
|
||||
return CryptogramUtil.SM2Decrypt(cipherText);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取所有接口/动态API 🔖
|
||||
/// </summary>
|
||||
|
||||
@ -26,6 +26,8 @@ public static class SqlSugarFilter
|
||||
sysCacheService.Remove($"{CacheConst.KeyUserOrg}{userId}");
|
||||
// 删除最大数据权限缓存
|
||||
sysCacheService.Remove($"{CacheConst.KeyRoleMaxDataScope}{userId}");
|
||||
// 用户权限缓存(接口集合)
|
||||
sysCacheService.Remove($"{CacheConst.KeyUserApi}{userId}");
|
||||
// 删除用户机构(数据范围)缓存——过滤器
|
||||
_cache.Remove($"db:{dbConfigId}:orgList:{userId}");
|
||||
}
|
||||
|
||||
@ -62,6 +62,10 @@ public static class SqlSugarSetup
|
||||
/// <param name="config"></param>
|
||||
public static void SetDbConfig(DbConnectionConfig config)
|
||||
{
|
||||
// 解密数据库连接串
|
||||
if (config.DbSettings.EnableConnEncrypt)
|
||||
config.ConnectionString = CryptogramUtil.Decrypt(config.ConnectionString);
|
||||
|
||||
var configureExternalServices = new ConfigureExternalServices
|
||||
{
|
||||
EntityNameService = (type, entity) => // 处理表
|
||||
|
||||
@ -344,7 +344,7 @@ public class MemoryMetricsClient
|
||||
#endif
|
||||
var metrics = new MemoryMetrics();
|
||||
var lines = output.Trim().Split('\n', (char)StringSplitOptions.RemoveEmptyEntries);
|
||||
if (lines.Length <= 0) return metrics;
|
||||
if (lines.Length <= 1) return metrics;
|
||||
|
||||
var freeMemoryParts = lines[0].Split('=', (char)StringSplitOptions.RemoveEmptyEntries);
|
||||
var totalMemoryParts = lines[1].Split('=', (char)StringSplitOptions.RemoveEmptyEntries);
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"name": "admin.net.pro",
|
||||
"type": "module",
|
||||
"version": "2.4.33",
|
||||
"lastBuildTime": "2024.11.19",
|
||||
"lastBuildTime": "2024.11.20",
|
||||
"description": "Admin.NET 站在巨人肩膀上的 .NET 通用权限开发框架",
|
||||
"author": "zuohuaijun",
|
||||
"license": "MIT",
|
||||
@ -71,7 +71,7 @@
|
||||
"vue-router": "^4.4.5",
|
||||
"vue-signature-pad": "^3.0.2",
|
||||
"vue3-tree-org": "^4.2.2",
|
||||
"vxe-pc-ui": "^4.3.1",
|
||||
"vxe-pc-ui": "^4.3.2",
|
||||
"vxe-table": "^4.8.10",
|
||||
"vxe-table-plugin-element": "^4.0.4",
|
||||
"vxe-table-plugin-export-xlsx": "^4.0.7",
|
||||
@ -90,7 +90,7 @@
|
||||
"@vitejs/plugin-vue": "^5.2.0",
|
||||
"@vitejs/plugin-vue-jsx": "^4.1.0",
|
||||
"@vue/compiler-sfc": "^3.5.13",
|
||||
"code-inspector-plugin": "^0.18.1",
|
||||
"code-inspector-plugin": "^0.18.2",
|
||||
"eslint": "^9.15.0",
|
||||
"eslint-plugin-vue": "^9.31.0",
|
||||
"globals": "^15.12.0",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user