CrazyIter_Bin 1 year ago
parent
commit
bb0c100bd3

+ 2 - 2
TEAMModelOS.FunctionV4/ServiceBus/ActiveTaskTopic.cs

@@ -1150,7 +1150,7 @@ namespace TEAMModelOS.FunctionV4.ServiceBus
         /// </summary>
         /// <param name="msg"></param>
         /// <returns></returns>
-        [Function("CopyStandardFile")]
+        ///[Function("CopyStandardFile")]  弃用
         public async Task BatchCopyBlobFunc([ServiceBusTrigger("%Azure:ServiceBus:ActiveTask%", "copy-standard-file", Connection = "Azure:ServiceBus:ConnectionString")] string msg)
         {
             try
@@ -2155,7 +2155,7 @@ namespace TEAMModelOS.FunctionV4.ServiceBus
         ///// </data>
         /// <param name="msg"></param>
         /// <returns></returns>
-        [Function("Course")]
+        ///[Function("Course")]   弃用 
         public async Task CourseFunc([ServiceBusTrigger("%Azure:ServiceBus:ActiveTask%", "course", Connection = "Azure:ServiceBus:ConnectionString")] string msg)
         {
             var client = _azureCosmos.GetCosmosClient();

+ 7 - 0
TEAMModelOS.SDK/Models/Cosmos/Common/Activity.cs

@@ -29,6 +29,9 @@ namespace TEAMModelOS.SDK.Models
         public List<Attachment> attachment { get; set; } = new List<Attachment>();
         public List<string> zb { get; set; } = new List<string>();
         public List<string> cb { get; set; } = new List<string>();
+        /// <summary>
+        /// 免责声明
+        /// </summary>
         public string mzsm { get; set; } 
         /// <summary>
         /// "hbcn/区级id,areaId",
@@ -139,6 +142,10 @@ namespace TEAMModelOS.SDK.Models
         /// 展示到期时间,-1永不过期
         /// </summary>
         public long expire { get; set; }
+        /// <summary>
+        /// 来源 activity ,upload, link 
+        /// </summary>
+        public string source { get; set; }
     }
 
     public class InviteTeachers {

+ 6 - 1
TEAMModelOS/Controllers/Client/AClassONEController.cs

@@ -679,6 +679,7 @@ namespace TEAMModelOS.Controllers
                 if (phoneInfo.code==200)
                 {
                     string _mobile = phoneInfo.phone.phoneNumber;
+                  
                     string sql = $"select value c from c where c.mobile='{_mobile}'";
                     List<Guardian> guardians = new List<Guardian>();
                     await foreach (var item in _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Student).
@@ -775,6 +776,9 @@ namespace TEAMModelOS.Controllers
                         foreach (var x in first.students) 
                         {
                             var stu = studentes.Find(s => s.id.Equals(x.id) && s.schoolId.Equals(x.code));
+                            if (stu== null) {
+                                continue;
+                            }
                             var school = idSchools.Find(s => s.id.Equals(x.code));
                             string periodName = "";
                             if (school != null && stu != null && !string.IsNullOrWhiteSpace(stu.periodId))
@@ -834,7 +838,8 @@ namespace TEAMModelOS.Controllers
                         return Ok(new { code = 1, msg = "暂未找到学生信息", mobile = _mobile });
                     }
                 }
-                else {
+                else
+                {
                     return BadRequest("手机授权码过期!");
                 }
             }

+ 6 - 1
TEAMModelOS/Controllers/XTest/TestController.cs

@@ -99,6 +99,11 @@ namespace TEAMModelOS.Controllers
         [HttpPost("test-ru")]
         public async Task<IActionResult> FixSemester(JsonElement json)
         {
+
+            await _azureStorage.GetBlobContainerClient("0-public").GetBlobClient("winteach.cn_nginx.zip").SetAccessTierAsync(AccessTier.Archive);
+            await  _azureStorage.GetBlobServiceClient().GetBlobBatchClient().SetBlobsAccessTierAsync(
+                blobUris: new Uri[] { new Uri("https://teammodeltest.blob.core.chinacloudapi.cn/0-public/test.md"),
+                    new Uri("https://teammodeltest.blob.core.chinacloudapi.cn/0-public/pay.html") },accessTier:AccessTier.Archive);
             //var cm = _azureRedis.GetConnectionMultiplexer();
             //var keys = cm.GetServer(cm.GetEndPoints()[0]).Keys(cm.GetDatabase(8).Database,"Blob:Catalog*");
             //List<string> ks = new List<string>();
@@ -106,7 +111,7 @@ namespace TEAMModelOS.Controllers
             //{
             //    ks.Add(key.ToString());
             //}
-         
+
             var result4 = await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Common).GetList<ExamInfo>($"select value c from c where c.pk='Exam'and c.owner='teacher'", null, pageSize: 200);
             var result0 = await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Common).GetList<ExamInfo>($"select value c from c where c.pk='Exam'and c.owner='teacher' and STARTSWITH(c.code,'Exam-')", null, pageSize: 200);
             var result1 = await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Common).GetList<ExamInfo>($"select value c from c where c.pk='Exam' and c.owner='teacher' and contains(c.code,'Exam-')", null, pageSize: 200);