Browse Source

优化bolo操作代码。

CrazyIter_Bin 3 years ago
parent
commit
d98c2f0bf5

+ 1 - 1
TEAMModelOS.SDK/Models/Cosmos/Common/Bloblog.cs

@@ -17,7 +17,7 @@ namespace TEAMModelOS.SDK.Models
         public List<string> subjectId { get; set; } = new List<string>() { "" };
         public List<string> subjectId { get; set; } = new List<string>() { "" };
         public List<string> gradeId { get; set; } = new List<string>() { "" };
         public List<string> gradeId { get; set; } = new List<string>() { "" };
         /// <summary>
         /// <summary>
-        /// audio 音频,video 视频 ,doc文档,image图片,other 其他,res教材,thum缩略图
+        /// audio 音频,video 视频 ,doc文档,image图片,other 其他,res教材,thum缩略图,avatar 头像
         /// </summary>
         /// </summary>
         public string type { get; set; }
         public string type { get; set; }
 
 

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

@@ -165,7 +165,7 @@ namespace TEAMModelOS.Controllers.Core
         }
         }
 
 
         /// <summary>
         /// <summary>
-        ///     {"containerName":"hbcn","cache":true,"scope":"school"}
+        ///     {"containerName":"hbcn","scope":"school"}
         /// 获取容器的 分类及总量
         /// 获取容器的 分类及总量
         /// </summary>
         /// </summary>
         /// <param name="azureBlobSASDto"></param>
         /// <param name="azureBlobSASDto"></param>
@@ -242,7 +242,7 @@ namespace TEAMModelOS.Controllers.Core
                 }
                 }
             }
             }
             catch (Exception  ex){
             catch (Exception  ex){
-                await _dingDing.SendBotMsg($"IES5,{_option.Location},blon/get-blobsize()\n{ex.Message}{ex.StackTrace}", GroupNames.醍摩豆服務運維群組);
+                await _dingDing.SendBotMsg($"IES5,{_option.Location},blon/used-space()\n{ex.Message}{ex.StackTrace}", GroupNames.醍摩豆服務運維群組);
             }
             }
             return BadRequest();
             return BadRequest();
         }
         }

+ 0 - 4
TEAMModelOS/Controllers/School/CourseController.cs

@@ -374,8 +374,6 @@ namespace TEAMModelOS.Controllers
                                 defaultSchool = null,
                                 defaultSchool = null,
                                 schools = new List<TmdUser.School>(),
                                 schools = new List<TmdUser.School>(),
                             };
                             };
-                            var container = _azureStorage.GetBlobContainerClient(id);
-                            await container.CreateIfNotExistsAsync(PublicAccessType.None); //嘗試創建Teacher私有容器,如存在則不做任何事,保障容器一定存在
                             tmduser = await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, "Student").CreateItemAsync<TmdUser>(tmduser, new PartitionKey("Base"));
                             tmduser = await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, "Student").CreateItemAsync<TmdUser>(tmduser, new PartitionKey("Base"));
                         }
                         }
                     }
                     }
@@ -457,8 +455,6 @@ namespace TEAMModelOS.Controllers
                                 defaultSchool = null,
                                 defaultSchool = null,
                                 schools = new List<TmdUser.School>(),
                                 schools = new List<TmdUser.School>(),
                             };
                             };
-                            var container = _azureStorage.GetBlobContainerClient(userid);
-                            await container.CreateIfNotExistsAsync(PublicAccessType.None); //嘗試創建Teacher私有容器,如存在則不做任何事,保障容器一定存在
                             tmduser = await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, "Student").CreateItemAsync<TmdUser>(tmduser, new PartitionKey("Base"));
                             tmduser = await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, "Student").CreateItemAsync<TmdUser>(tmduser, new PartitionKey("Base"));
                         }
                         }
                     }
                     }