Эх сурвалжийг харах

😒1、修复租户密码重置问题 2、修复dynamic与字符串转换问题 3、升级nuget包

zuohuaijun 3 жил өмнө
parent
commit
5f7e88763f

+ 3 - 3
Admin.NET/Admin.NET.Core/Admin.NET.Core.csproj

@@ -17,9 +17,9 @@
     <PackageReference Include="AngleSharp" Version="0.17.1" />
     <PackageReference Include="AspNetCoreRateLimit" Version="5.0.0" />
     <PackageReference Include="DotNetCore.Natasha.CSharp" Version="5.0.2" />
-    <PackageReference Include="Furion.Extras.Authentication.JwtBearer" Version="4.8.4.6" />
-    <PackageReference Include="Furion.Extras.ObjectMapper.Mapster" Version="4.8.4.6" />
-    <PackageReference Include="Furion.Pure" Version="4.8.4.6" />
+    <PackageReference Include="Furion.Extras.Authentication.JwtBearer" Version="4.8.4.8" />
+    <PackageReference Include="Furion.Extras.ObjectMapper.Mapster" Version="4.8.4.8" />
+    <PackageReference Include="Furion.Pure" Version="4.8.4.8" />
     <PackageReference Include="Lazy.Captcha.Core" Version="2.0.0" />
     <PackageReference Include="Magicodes.IE.Excel" Version="2.7.4.2" />
     <PackageReference Include="Magicodes.IE.Pdf" Version="2.7.4.2" />

+ 1 - 1
Admin.NET/Admin.NET.Core/Service/Tenant/SysTenantService.cs

@@ -320,7 +320,7 @@ public class SysTenantService : IDynamicApiController, ITransient
     {
         var password = await _sysConfigService.GetConfigValue<string>(CommonConst.SysPassword);
         var encryptPassword = MD5Encryption.Encrypt(password);
-        await _sysUserRep.UpdateSetColumnsTrueAsync(u => new SysUser() { Password = password }, u => u.Id == input.UserId);
+        await _sysUserRep.UpdateSetColumnsTrueAsync(u => new SysUser() { Password = encryptPassword }, u => u.Id == input.UserId);
     }
 
     /// <summary>

+ 8 - 8
Admin.NET/Admin.NET.Core/SqlSugar/SqlSugarSetup.cs

@@ -293,8 +293,8 @@ public static class SqlSugarSetup
             {
                 // 排除非当前数据库实体
                 var tAtt = entityType.GetCustomAttribute<TenantAttribute>();
-                if ((tAtt != null && (string)db.CurrentConnectionConfig.ConfigId != tAtt.configId.ToString()) ||
-                    (tAtt == null && (string)db.CurrentConnectionConfig.ConfigId != SqlSugarConst.ConfigId))
+                if ((tAtt != null && db.CurrentConnectionConfig.ConfigId.ToString() != tAtt.configId.ToString()) ||
+                    (tAtt == null && db.CurrentConnectionConfig.ConfigId.ToString() != SqlSugarConst.ConfigId))
                     continue;
 
                 var lambda = DynamicExpressionParser.ParseLambda(new[] {
@@ -341,8 +341,8 @@ public static class SqlSugarSetup
                 {
                     // 排除非当前数据库实体
                     var tenantAtt = entityType.GetCustomAttribute<TenantAttribute>();
-                    if ((tenantAtt != null && (string)db.CurrentConnectionConfig.ConfigId != tenantAtt.configId.ToString()) ||
-                        (tenantAtt == null && (string)db.CurrentConnectionConfig.ConfigId != SqlSugarConst.ConfigId))
+                    if ((tenantAtt != null && db.CurrentConnectionConfig.ConfigId.ToString() != tenantAtt.configId.ToString()) ||
+                        (tenantAtt == null && db.CurrentConnectionConfig.ConfigId.ToString() != SqlSugarConst.ConfigId))
                         continue;
                 }
 
@@ -390,8 +390,8 @@ public static class SqlSugarSetup
             {
                 // 排除非当前数据库实体
                 var tAtt = entityType.GetCustomAttribute<TenantAttribute>();
-                if ((tAtt != null && (string)db.CurrentConnectionConfig.ConfigId != tAtt.configId.ToString()) ||
-                    (tAtt == null && (string)db.CurrentConnectionConfig.ConfigId != SqlSugarConst.ConfigId))
+                if ((tAtt != null && db.CurrentConnectionConfig.ConfigId.ToString() != tAtt.configId.ToString()) ||
+                    (tAtt == null && db.CurrentConnectionConfig.ConfigId.ToString() != SqlSugarConst.ConfigId))
                     continue;
 
                 var lambda = DynamicExpressionParser.ParseLambda(new[] {
@@ -440,8 +440,8 @@ public static class SqlSugarSetup
                     var entityType = tableFilterItem.GetType().GetProperty("type", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(tableFilterItem, null) as Type;
                     // 排除非当前数据库实体
                     var tAtt = entityType.GetCustomAttribute<TenantAttribute>();
-                    if ((tAtt != null && (string)db.CurrentConnectionConfig.ConfigId != tAtt.configId.ToString()) ||
-                        (tAtt == null && (string)db.CurrentConnectionConfig.ConfigId != SqlSugarConst.ConfigId))
+                    if ((tAtt != null && db.CurrentConnectionConfig.ConfigId.ToString() != tAtt.configId.ToString()) ||
+                        (tAtt == null && db.CurrentConnectionConfig.ConfigId.ToString() != SqlSugarConst.ConfigId))
                         return;
 
                     tableFilterItems.Add(tableFilterItem);