Переглянути джерело

😎清理代码及升级依赖

zuohuaijun 1 рік тому
батько
коміт
04010e0e28

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

@@ -38,12 +38,12 @@
     <PackageReference Include="SixLabors.ImageSharp.Web" Version="3.1.3" />
     <PackageReference Include="SKIT.FlurlHttpClient.Wechat.Api" Version="3.6.0" />
     <PackageReference Include="SKIT.FlurlHttpClient.Wechat.TenpayV3" Version="3.9.0" />
-    <PackageReference Include="SqlSugarCore" Version="5.1.4.170" />
+    <PackageReference Include="SqlSugarCore" Version="5.1.4.171" />
     <PackageReference Include="SSH.NET" Version="2024.2.0" />
-    <PackageReference Include="System.Linq.Dynamic.Core" Version="1.4.9" />
+    <PackageReference Include="System.Linq.Dynamic.Core" Version="1.5.0" />
     <PackageReference Include="System.Net.Http" Version="4.3.4" />
     <PackageReference Include="System.Private.Uri" Version="4.3.2" />
-    <PackageReference Include="TencentCloudSDK.Sms" Version="3.0.1136" />
+    <PackageReference Include="TencentCloudSDK.Sms" Version="3.0.1137" />
     <PackageReference Include="UAParser" Version="3.1.47" />
     <PackageReference Include="Yitter.IdGenerator" Version="1.0.14" />
   </ItemGroup>

+ 2 - 2
Admin.NET/Admin.NET.Core/Service/CodeGen/SysCodeGenService.cs

@@ -152,10 +152,10 @@ public class SysCodeGenService : IDynamicApiController, ITransient
         var tableOutputList = new List<TableOutput>();
         foreach (var item in entityInfos)
         {
-            var tbConfigId = item.Type.GetCustomAttribute<TenantAttribute>()?.configId as string ?? SqlSugarConst.MainConfigId ;
+            var tbConfigId = item.Type.GetCustomAttribute<TenantAttribute>()?.configId as string ?? SqlSugarConst.MainConfigId;
             if (item.Type.IsDefined(typeof(LogTableAttribute))) tbConfigId = SqlSugarConst.LogConfigId;
             if (tbConfigId != configId) continue;
-            
+
             var table = dbTableInfos.FirstOrDefault(u => string.Equals(u.Name, (config!.DbSettings.EnableUnderLine ? UtilMethods.ToUnderLine(item.DbTableName) : item.DbTableName), StringComparison.CurrentCultureIgnoreCase));
             if (table == null) continue;
             tableOutputList.Add(new TableOutput

+ 10 - 10
Admin.NET/Admin.NET.Core/Service/Region/SysRegionService.cs

@@ -145,11 +145,11 @@ public class SysRegionService : IDynamicApiController, ITransient
     {
         var syncLevel = await _sysConfigService.GetConfigValue<int>(ConfigConst.SysRegionSyncLevel);
         if (syncLevel is < 1 or > 5) syncLevel = 3;//默认区县级
-        
+
         await _sysRegionRep.DeleteAsync(u => u.Id > 0);
-        
+
         await SyncByMap(syncLevel);
-        
+
         // var context = BrowsingContext.New(AngleSharp.Configuration.Default.WithDefaultLoader());
         // var dom = await context.OpenAsync(_url);
         //
@@ -265,7 +265,7 @@ public class SysRegionService : IDynamicApiController, ITransient
         //     await _sysRegionRep.Context.Fastest<SysRegion>().BulkCopyAsync(list);
         // }
     }
-    
+
     /// <summary>
     /// 从统计局地图页面同步
     /// </summary>
@@ -291,11 +291,11 @@ public class SysRegionService : IDynamicApiController, ITransient
                 Level = 1,
                 Pid = 0,
             };
-            if (municipalityList.Any(m => province.Name.StartsWith(m))) province.Name +=  "(省)";
+            if (municipalityList.Any(m => province.Name.StartsWith(m))) province.Name += "(省)";
             list.Add(province);
 
             if (syncLevel <= 1) continue;
-            
+
             var prefList = await GetSelectList(provName);
             foreach (var dict2 in prefList)
             {
@@ -309,11 +309,11 @@ public class SysRegionService : IDynamicApiController, ITransient
                     Name = prefName,
                     Level = 2
                 };
-                if (municipalityList.Any(m => city.Name.StartsWith(m))) city.Name +=  "(地)";
+                if (municipalityList.Any(m => city.Name.StartsWith(m))) city.Name += "(地)";
                 list.Add(city);
-                
+
                 if (syncLevel <= 2) continue;
-                
+
                 var countyList = await GetSelectList(provName, prefName);
                 foreach (var dict3 in countyList)
                 {
@@ -335,7 +335,7 @@ public class SysRegionService : IDynamicApiController, ITransient
         }
 
         // 获取选择数据
-        async Task<List<Dictionary<string, string>>> GetSelectList(string prov, string prefecture=null)
+        async Task<List<Dictionary<string, string>>> GetSelectList(string prov, string prefecture = null)
         {
             var data = "";
             if (!string.IsNullOrWhiteSpace(prov)) data += $"shengji={prov}";