CrazyIter_Bin %!s(int64=3) %!d(string=hai) anos
pai
achega
acfbf5fdaf

+ 1 - 1
TEAMModelOS.SDK/DI/AzureStorage/AzureStorageBlobExtensions.cs

@@ -131,7 +131,7 @@ namespace TEAMModelOS.SDK.DI
         /// 
         /// 
         /// </summary>      
         /// </summary>      
         /// <param name="prefix">篩選開頭名稱,Null代表容器</param>        
         /// <param name="prefix">篩選開頭名稱,Null代表容器</param>        
-        public static async Task<bool> DelectBlobs(this BlobServiceClient client, string blobContainerName, List<string> prefixs )
+        public static async Task<bool> DeleteBlobs(this BlobServiceClient client, string blobContainerName, List<string> prefixs )
         {
         {
             if (!prefixs.IsNotEmpty()) return false;
             if (!prefixs.IsNotEmpty()) return false;
             try
             try

+ 1 - 1
TEAMModelOS/Controllers/Common/ExamController.cs

@@ -309,7 +309,7 @@ namespace TEAMModelOS.Controllers
                 //string school_code = code.ToString().Substring(typeof(ExamClassResult).Name.Length + 1);
                 //string school_code = code.ToString().Substring(typeof(ExamClassResult).Name.Length + 1);
                 var response = await client.GetContainer("TEAMModelOS", "Common").DeleteItemStreamAsync(id.ToString(), new PartitionKey($"Exam-{code}"));
                 var response = await client.GetContainer("TEAMModelOS", "Common").DeleteItemStreamAsync(id.ToString(), new PartitionKey($"Exam-{code}"));
                 //删除blob 相关资料
                 //删除blob 相关资料
-                await _azureStorage.GetBlobServiceClient().DelectBlobs(code.ToString(), new List<string> { $"exam/{id}" });
+                await _azureStorage.GetBlobServiceClient().DeleteBlobs(code.ToString(), new List<string> { $"exam/{id}" });
                 //通知评测删除信息
                 //通知评测删除信息
                 var messageBlob = new ServiceBusMessage(new { id = Guid.NewGuid().ToString(), progress = "delete", root = $"exam/{id}", name = $"{code}" }.ToJsonString());
                 var messageBlob = new ServiceBusMessage(new { id = Guid.NewGuid().ToString(), progress = "delete", root = $"exam/{id}", name = $"{code}" }.ToJsonString());
                 messageBlob.ApplicationProperties.Add("name", "BlobRoot");
                 messageBlob.ApplicationProperties.Add("name", "BlobRoot");

+ 1 - 1
TEAMModelOS/Controllers/Common/SurveyController.cs

@@ -347,7 +347,7 @@ namespace TEAMModelOS.Controllers
                     _azureRedis.GetRedisClient(8).KeyDelete($"Survey:Record:{survey.id}");
                     _azureRedis.GetRedisClient(8).KeyDelete($"Survey:Record:{survey.id}");
                     _azureRedis.GetRedisClient(8).KeyDelete($"Survey:Submit:{survey.id}");
                     _azureRedis.GetRedisClient(8).KeyDelete($"Survey:Submit:{survey.id}");
                     //删除blob 相关资料
                     //删除blob 相关资料
-                    await _azureStorage.GetBlobServiceClient().DelectBlobs(code.ToString(),new List<string> { $"survey/{id}" });
+                    await _azureStorage.GetBlobServiceClient().DeleteBlobs(code.ToString(),new List<string> { $"survey/{id}" });
                     //通知删除信息
                     //通知删除信息
                     var messageBlob = new ServiceBusMessage(new { id = Guid.NewGuid().ToString(), progress = "delete", root = $"survey/{id}", name = $"{code}" }.ToJsonString());
                     var messageBlob = new ServiceBusMessage(new { id = Guid.NewGuid().ToString(), progress = "delete", root = $"survey/{id}", name = $"{code}" }.ToJsonString());
                     messageBlob.ApplicationProperties.Add("name", "BlobRoot");
                     messageBlob.ApplicationProperties.Add("name", "BlobRoot");

+ 1 - 1
TEAMModelOS/Controllers/Common/VoteController.cs

@@ -350,7 +350,7 @@ namespace TEAMModelOS.Controllers.Learn
                     await _dingDing.SendBotMsg($"{_option.Location}-投票活动【{vote.name}-{vote.id}】被删除", GroupNames.成都开发測試群組);
                     await _dingDing.SendBotMsg($"{_option.Location}-投票活动【{vote.name}-{vote.id}】被删除", GroupNames.成都开发測試群組);
 
 
                     //删除blob 相关资料
                     //删除blob 相关资料
-                    await _azureStorage.GetBlobServiceClient().DelectBlobs(code.ToString(), new List<string> { $"vote/{id}" });
+                    await _azureStorage.GetBlobServiceClient().DeleteBlobs(code.ToString(), new List<string> { $"vote/{id}" });
                     //通知删除信息
                     //通知删除信息
                     var messageBlob = new ServiceBusMessage(new { id = Guid.NewGuid().ToString(), progress = "delete", root = $"vote/{id}", name = $"{code}" }.ToJsonString());
                     var messageBlob = new ServiceBusMessage(new { id = Guid.NewGuid().ToString(), progress = "delete", root = $"vote/{id}", name = $"{code}" }.ToJsonString());
                     messageBlob.ApplicationProperties.Add("name", "BlobRoot");
                     messageBlob.ApplicationProperties.Add("name", "BlobRoot");

+ 4 - 4
TEAMModelOS/Controllers/Core/BlobController.cs

@@ -436,14 +436,14 @@ namespace TEAMModelOS.Controllers.Core
                         }
                         }
                         var turl = _azureStorage.GetBlobSAS($"{_cntr}", thum, BlobSasPermissions.Read | BlobSasPermissions.List);
                         var turl = _azureStorage.GetBlobSAS($"{_cntr}", thum, BlobSasPermissions.Read | BlobSasPermissions.List);
                         bcc.GetBlobClient(tname).SyncCopyFromUri(new Uri(turl));
                         bcc.GetBlobClient(tname).SyncCopyFromUri(new Uri(turl));
-                        await _azureStorage.GetBlobServiceClient().DelectBlobs($"{_cntr}", new List<string> { thum });
+                        await _azureStorage.GetBlobServiceClient().DeleteBlobs($"{_cntr}", new List<string> { thum });
                     }
                     }
                     string targetName = item.Name.Replace(px, newName);
                     string targetName = item.Name.Replace(px, newName);
                     var url = _azureStorage.GetBlobSAS($"{_cntr}", item.Name, BlobSasPermissions.Read | BlobSasPermissions.List);
                     var url = _azureStorage.GetBlobSAS($"{_cntr}", item.Name, BlobSasPermissions.Read | BlobSasPermissions.List);
                     bcc.GetBlobClient(targetName).SyncCopyFromUri(new Uri(url));
                     bcc.GetBlobClient(targetName).SyncCopyFromUri(new Uri(url));
 
 
                 };
                 };
-                await _azureStorage.GetBlobServiceClient().DelectBlobs($"{_cntr}", new List<string> { px });
+                await _azureStorage.GetBlobServiceClient().DeleteBlobs($"{_cntr}", new List<string> { px });
                 await client.GetContainer("TEAMModelOS", tbname).ReplaceItemAsync<Bloblog>(bloblog, $"{_id}", new PartitionKey($"Bloblog-{_cntr}"));
                 await client.GetContainer("TEAMModelOS", tbname).ReplaceItemAsync<Bloblog>(bloblog, $"{_id}", new PartitionKey($"Bloblog-{_cntr}"));
                 string u = "";
                 string u = "";
                 string[] uls = System.Web.HttpUtility.UrlDecode(px, Encoding.UTF8).Split("/");
                 string[] uls = System.Web.HttpUtility.UrlDecode(px, Encoding.UTF8).Split("/");
@@ -652,7 +652,7 @@ namespace TEAMModelOS.Controllers.Core
             }
             }
             if (prefix != null && blobContainerName != null)
             if (prefix != null && blobContainerName != null)
             {
             {
-                var status = await _azureStorage.GetBlobServiceClient().DelectBlobs(blobContainerName, new List<string> { prefix });
+                var status = await _azureStorage.GetBlobServiceClient().DeleteBlobs(blobContainerName, new List<string> { prefix });
                 string u = "";
                 string u = "";
                 string[] uls = System.Web.HttpUtility.UrlDecode($"{prefixjson}", Encoding.UTF8).Split("/");
                 string[] uls = System.Web.HttpUtility.UrlDecode($"{prefixjson}", Encoding.UTF8).Split("/");
                 if (uls != null)
                 if (uls != null)
@@ -754,7 +754,7 @@ namespace TEAMModelOS.Controllers.Core
                         }
                         }
                         deleteUrl.Add(delUrl);
                         deleteUrl.Add(delUrl);
                     });
                     });
-                    var status = await _azureStorage.GetBlobServiceClient().DelectBlobs(blobContainerName, deleteUrl);
+                    var status = await _azureStorage.GetBlobServiceClient().DeleteBlobs(blobContainerName, deleteUrl);
                     //释放的空间
                     //释放的空间
                     HashSet<string> root = new HashSet<string>();
                     HashSet<string> root = new HashSet<string>();
                     foreach (var x in deleteUrl)
                     foreach (var x in deleteUrl)

+ 2 - 2
TEAMModelOS/Controllers/Core/ImportController.cs

@@ -143,7 +143,7 @@ namespace TEAMModelOS.Controllers
 
 
         private async Task<string> HTEXTranslator(string containerid, string FileName, Stream stream)
         private async Task<string> HTEXTranslator(string containerid, string FileName, Stream stream)
         {
         {
-            await _azureStorage.GetBlobServiceClient().DelectBlobs(containerid,new List<string> { $"res/{FileName}" });
+            await _azureStorage.GetBlobServiceClient().DeleteBlobs(containerid,new List<string> { $"res/{FileName}" });
             Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
             Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
             //处理中文乱码问题
             //处理中文乱码问题
             Encoding encoding = Encoding.GetEncoding("GB2312");
             Encoding encoding = Encoding.GetEncoding("GB2312");
@@ -311,7 +311,7 @@ namespace TEAMModelOS.Controllers
             {
             {
                 containerid = "teammodelos";
                 containerid = "teammodelos";
             }
             }
-            var status = await _azureStorage.GetBlobServiceClient().DelectBlobs(containerid, new List<string> { $"res/{FileName}" });
+            var status = await _azureStorage.GetBlobServiceClient().DeleteBlobs(containerid, new List<string> { $"res/{FileName}" });
 
 
             string shaCode = Guid.NewGuid().ToString();
             string shaCode = Guid.NewGuid().ToString();
             HTEXLib.Htex htex = _PPTX2HTEXTranslator.Translate(streamFile);
             HTEXLib.Htex htex = _PPTX2HTEXTranslator.Translate(streamFile);

+ 1 - 1
TEAMModelOS/Controllers/Item/ItemController.cs

@@ -291,7 +291,7 @@ namespace TEAMModelOS.Controllers
                 if (!request.TryGetProperty("scope", out JsonElement scope)) return BadRequest();
                 if (!request.TryGetProperty("scope", out JsonElement scope)) return BadRequest();
                 var client = _azureCosmos.GetCosmosClient();
                 var client = _azureCosmos.GetCosmosClient();
                 //删除blob 相关资料
                 //删除blob 相关资料
-                await _azureStorage.GetBlobServiceClient().DelectBlobs(code.ToString().Replace("Item-",""),new List<string> { $"item/{id}" });
+                await _azureStorage.GetBlobServiceClient().DeleteBlobs(code.ToString().Replace("Item-",""),new List<string> { $"item/{id}" });
                 //通知删除信息
                 //通知删除信息
                 var messageBlob = new ServiceBusMessage(new { id = Guid.NewGuid().ToString(), progress = "delete", root = $"item/{id}", name = code.ToString().Replace("Item-", "") }.ToJsonString());
                 var messageBlob = new ServiceBusMessage(new { id = Guid.NewGuid().ToString(), progress = "delete", root = $"item/{id}", name = code.ToString().Replace("Item-", "") }.ToJsonString());
                 messageBlob.ApplicationProperties.Add("name", "BlobRoot");
                 messageBlob.ApplicationProperties.Add("name", "BlobRoot");

+ 1 - 1
TEAMModelOS/Controllers/Paper/PaperController.cs

@@ -57,7 +57,7 @@ namespace TEAMModelOS.Controllers
             Paper paper;
             Paper paper;
             var client = _azureCosmos.GetCosmosClient();
             var client = _azureCosmos.GetCosmosClient();
             //删除blob 相关资料
             //删除blob 相关资料
-            await _azureStorage.GetBlobServiceClient().DelectBlobs(code.ToString().Replace("Paper-",""), new List<string> { $"paper/{id}" });
+            await _azureStorage.GetBlobServiceClient().DeleteBlobs(code.ToString().Replace("Paper-",""), new List<string> { $"paper/{id}" });
             //通知删除信息
             //通知删除信息
             var messageBlob = new ServiceBusMessage(new { id = Guid.NewGuid().ToString(), progress = "delete", root = $"paper/{id}", name = code.ToString().Replace("Paper-", "")}.ToJsonString());
             var messageBlob = new ServiceBusMessage(new { id = Guid.NewGuid().ToString(), progress = "delete", root = $"paper/{id}", name = code.ToString().Replace("Paper-", "")}.ToJsonString());
             messageBlob.ApplicationProperties.Add("name", "BlobRoot");
             messageBlob.ApplicationProperties.Add("name", "BlobRoot");