Browse Source

編碼由GB2312改為UTF8

jeff 11 months ago
parent
commit
63694adecd

+ 9 - 8
TEAMModelOS.Function/IESCosmosDBTrigger.cs

@@ -1,4 +1,4 @@
-using System;
+锘縰sing System;
 using System.Collections.Generic;
 using System.Text.Json;
 using Microsoft.Azure.Functions.Worker;
@@ -46,6 +46,7 @@ namespace TEAMModelOS.Function
             containerName: "Common",
             Connection = "Azure:Cosmos:ConnectionString",
             LeaseContainerName = "leases",
+            LeaseContainerPrefix = "TEAMModelOS",
             CreateLeaseContainerIfNotExists = true,StartFromBeginning =false)] IReadOnlyList<JsonElement> input)
         {
             if (input != null && input.Count > 0)
@@ -57,14 +58,14 @@ namespace TEAMModelOS.Function
                 foreach (var element in input) {
                     element.TryGetProperty("_ts", out JsonElement _ts);
                     element.TryGetProperty("id", out JsonElement _id);
-                    //_logger.LogInformation($"过期数据=>时间戳:{_ts.GetInt64()}-id:{_id}");
+                    //_logger.LogInformation($"过期数据=>时间戳:{_ts.GetInt64()}-id:{_id}");
                     //return;
 
                     //if (JsonValueKind.Number.Equals(_ts.ValueKind)  && 1719331200>_ts.GetInt64()) {
-                    //    _logger.LogInformation($"过期数据=>时间戳:{_ts.GetInt64()}-id:{_id}"   );
+                    //    _logger.LogInformation($"过期数据=>时间戳:{_ts.GetInt64()}-id:{_id}"   );
                     //    return; 
                     //}
-                    _logger.LogInformation("变化参数 " + element);
+                    _logger.LogInformation("鍙樺寲鍙傛暟 " + element);
                     element.TryGetProperty("pk", out JsonElement jsond);
                     if (!string.IsNullOrWhiteSpace($"{jsond}"))
                     {
@@ -72,7 +73,7 @@ namespace TEAMModelOS.Function
                             || $"{jsond}".Equals("Notice", StringComparison.OrdinalIgnoreCase)
                             || $"{jsond}".Equals("ExamClassResult", StringComparison.OrdinalIgnoreCase))
                         {
-                            ///通知接收者的变更
+                            ///閫氱煡鎺ユ敹鑰呯殑鍙樻洿
                             continue;
                         }
                         //else if ($"{jsond}".Equals("StatsNotice", StringComparison.OrdinalIgnoreCase)) 
@@ -82,10 +83,10 @@ namespace TEAMModelOS.Function
                         else
                         {
                             TriggerData data = element.ToObject<TriggerData>();
-                            ///活动类型的变更
+                            ///活动类型的变更
 #if DEBUG
-                            await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}-CosmosDBTrigger,{data.pk}触发变更\n{data.ToJsonString()}",
-                                            GroupNames.醍摩豆服務運維群組);
+                            await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}-CosmosDBTrigger,{data.pk}瑙﹀彂鍙樻洿\n{data.ToJsonString()}",
+                                            GroupNames.醍摩豆服務運維群組);
 #endif
                             switch (data.pk)
                             {

+ 73 - 73
TEAMModelOS.Function/IESHttpTrigger.cs

@@ -1,4 +1,4 @@
-using Microsoft.AspNetCore.Http;
+锘縰sing Microsoft.AspNetCore.Http;
 using Microsoft.AspNetCore.Mvc;
 using Microsoft.Azure.Functions.Worker;
 using Microsoft.Extensions.Configuration;
@@ -161,7 +161,7 @@ namespace TEAMModelOS.Function
                             code = teacher.lang
                         });
                     }
-                    //如果已经扩容请忽略此通知!
+                    //如果已经扩容请忽略此通知!
                     string key = scope.Equals("school", StringComparison.OrdinalIgnoreCase) ? $"Blob:Space:School:Notify:{name}" : $"Blob:Space:Private:Notify:{name}";
                     foreach (var idnamecode in ids)
                     {
@@ -196,14 +196,14 @@ namespace TEAMModelOS.Function
                             }
                             else
                             {
-                                //已经发送过的不在提交
+                                //已经发送过的不在提交
                             }
                         }
                         else
                         {
                             if (blobSpaceNotify != null)
                             {
-                                //撤销
+                                //鎾ら攢
                                 var index = blobSpaceNotify.notifyIndex;
                                 await _azureRedis.GetRedisClient(8).HashDeleteAsync(key, filed);
                                 _coreAPIHttpService.CancelNotify(index, $"{Environment.GetEnvironmentVariable("Option:Location")}", _configuration);
@@ -215,7 +215,7 @@ namespace TEAMModelOS.Function
                 }
                 catch (Exception ex)
                 {
-                    await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")},空间不足,通知发送处理异常{ex.Message}\n{ex.StackTrace}", GroupNames.成都开发測試群組);
+                    await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")},空间不足,通知发送处理异常{ex.Message}\n{ex.StackTrace}", GroupNames.成都开发測試群組);
                 }
 
 
@@ -254,30 +254,30 @@ namespace TEAMModelOS.Function
                     {
                         foreach (var period in nottype_period)
                         {
-                            if (period.name.Contains("小学"))
+                            if (period.name.Contains("灏忓�"))
                             {
                                 period.periodType= "primary";
                             }
-                            if (period.name.Contains("初中"))
+                            if (period.name.Contains("鍒濅腑"))
                             {
                                 period.periodType = "junior";
                             }
-                            if (period.name.Contains("高中"))
+                            if (period.name.Contains("楂樹腑"))
                             {
                                 period.periodType = "senior";
                             }
                             if (string.IsNullOrWhiteSpace(period.periodType) && school.period.Count == 1)
                             {
-                                if (school.name.Contains("小学"))
+                                if (school.name.Contains("灏忓�"))
                                 {
                                     period.periodType = "primary";
 
                                 }
-                                if (school.name.Contains("初中"))
+                                if (school.name.Contains("鍒濅腑"))
                                 {
                                     period.periodType = "junior";
                                 }
-                                if (school.name.Contains("高中"))
+                                if (school.name.Contains("楂樹腑"))
                                 {
                                     period.periodType = "senior";
                                 }
@@ -292,11 +292,11 @@ namespace TEAMModelOS.Function
                     {
                         var dimension = artSetting.dimensions.FindAll(x => x.type.Intersect(new List<string> { period.periodType }).Any());
                         var bindIds = period.subjects.Where(s => !string.IsNullOrWhiteSpace(s.bindId)).Select(x => x.bindId);
-                        //该学段未同步学科的。
+                        //该学段未同步学科的。
                         var unBindIds = dimension.Where(z => !string.IsNullOrWhiteSpace(z.subjectBind)).Select(x => x.subjectBind).ToHashSet().Except(bindIds);
                         if (unBindIds.Any()  && unBindIds.Count()>0)
                         {
-                            //尝试寻找同名学科且没有设置bindId的
+                            //尝试寻找同名学科且没有设置bindId的
                             foreach (var unBindId in unBindIds)
                             {
                                 var subjects = artSetting.dimensions.FindAll(d => !string.IsNullOrWhiteSpace(d.subjectBind) && !string.IsNullOrWhiteSpace(d.subject) && d.subjectBind.Equals(unBindId))?.Select(m => m.subject);
@@ -304,7 +304,7 @@ namespace TEAMModelOS.Function
                                 {
                                     foreach (var subject in subjects)
                                     {
-                                        //获取同名学科,且没绑定的
+                                        //鑾峰彇鍚屽悕瀛︾�锛屼笖娌$粦瀹氱殑
                                         var sub = period.subjects.FindAll(sub => sub.name.Contains(subject) && string.IsNullOrWhiteSpace(sub.bindId));
                                         if (sub.IsNotEmpty())
                                         {
@@ -336,24 +336,24 @@ namespace TEAMModelOS.Function
                                     break;
                                 }
 
-                                //同步知识块。
+                                //同步知识块。
 
                                 if (old != null)
                                 {
                                     bool change = false;
-                                    //如果之前的是1 来源于区级,后面因区级删除,应该还原为0。
+                                    //如果之前的是1 来源于区级,后面因区级删除,应该还原为0。
                                     var oldBlocks = old.blocks.Select(x => x.name).ToHashSet();
                                     var dimBlocks = dim.SelectMany(d => d.blocks);
-                                    //增加的
+                                    //增加的
                                     var addBlocks = dimBlocks.Except(oldBlocks);
-                                    //减少的
+                                    //减少的
                                     var cutBlocks = oldBlocks.Except(dimBlocks);
                                     foreach (var add in addBlocks)
                                     {
                                         old.blocks.Add(new Block { name = add, source = 1 });
                                         change = true;
                                     }
-                                    //减少的还原为0
+                                    //鍑忓皯鐨勮繕鍘熶负0
                                     if (cutBlocks.Any())
                                     {
                                         old.blocks.ForEach(ob => {
@@ -379,7 +379,7 @@ namespace TEAMModelOS.Function
                                         await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.School).ReplaceItemAsync(old, old.id, new PartitionKey(old.code));
                                     }
                                     var count = new { pcount = old.points != null ? old.points.Count : 0, bcount = old.blocks != null ? old.blocks.Count : 0 };
-                                    //处理知识点,知识块计数问题
+                                    //处理知识点,知识块计数问题
                                     await _azureRedis.GetRedisClient(8).HashSetAsync($"Knowledge:Count:{old.owner}-{old.subjectId}", old.periodId, count.ToJsonString());
                                 }
                                 else
@@ -399,7 +399,7 @@ namespace TEAMModelOS.Function
                                         };
                                         await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.School).CreateItemAsync(_new, new PartitionKey(_new.code));
                                         var count = new { pcount = _new.points != null ? _new.points.Count : 0, bcount = _new.blocks != null ? _new.blocks.Count : 0 };
-                                        //处理知识点,知识块计数问题
+                                        //处理知识点,知识块计数问题
                                         await _azureRedis.GetRedisClient(8).HashSetAsync($"Knowledge:Count:{_new.owner}-{_new.subjectId}", _new.periodId, count.ToJsonString());
                                     }
                                 }
@@ -411,7 +411,7 @@ namespace TEAMModelOS.Function
             }
             catch (Exception ex)
             {
-                await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")},area-artsetting-change,{ex.Message}\n{ex.StackTrace}\n{msg}", GroupNames.醍摩豆服務運維群組);
+                await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")},area-artsetting-change,{ex.Message}\n{ex.StackTrace}\n{msg}", GroupNames.醍摩豆服務運維群組);
             }
             return new OkObjectResult(new { });
         }
@@ -424,7 +424,7 @@ namespace TEAMModelOS.Function
                 string data = await new StreamReader(req.Body).ReadToEndAsync();
                 var json = JsonDocument.Parse(data).RootElement;
                 jsondata = json;
-                //await  _dingDing.SendBotMsg( "毕业状态变更:"+json.ToJsonString(), GroupNames.成都开发測試群組);
+                //await  _dingDing.SendBotMsg( "毕业状态变更:"+json.ToJsonString(), GroupNames.成都开发測試群組);
                 string schoolId = null;
                 if (json.TryGetProperty("schoolId", out JsonElement _schoolId))
                 {
@@ -434,7 +434,7 @@ namespace TEAMModelOS.Function
                 {
                     return new OkObjectResult(new { });
                 }
-                //计算毕业的
+                //计算毕业的
                 if (json.TryGetProperty("graduate_classes", out JsonElement _graduate_classes))
                 {
                     List<Class> graduate_classes = _graduate_classes.ToObject<List<Class>>();
@@ -461,7 +461,7 @@ namespace TEAMModelOS.Function
                         }
                     }
                 }
-                //未毕业的
+                //鏈�瘯涓氱殑
                 if (json.TryGetProperty("cancel_graduate_classes", out JsonElement _cancel_graduate_classes))
                 {
                     List<Class> cancel_graduate_classes = _cancel_graduate_classes.ToObject<List<Class>>();
@@ -491,7 +491,7 @@ namespace TEAMModelOS.Function
             }
             catch (Exception ex)
             {
-                await _dingDing.SendBotMsg($"graduate-change,{ex.Message}\n{ex.StackTrace}\n{jsondata.ToJsonString()}", GroupNames.醍摩豆服務運維群組);
+                await _dingDing.SendBotMsg($"graduate-change,{ex.Message}\n{ex.StackTrace}\n{jsondata.ToJsonString()}", GroupNames.醍摩豆服務運維群組);
             }
             return new OkObjectResult(new {   });
         }
@@ -525,7 +525,7 @@ namespace TEAMModelOS.Function
 
                     lessonRecords.ForEach(item =>
                     {
-                        //修改标签
+                        //淇�敼鏍囩�
                         if (!string.IsNullOrWhiteSpace(on._new))
                         {
                             for (int i = 0; i < item.category.Count; i++)
@@ -538,7 +538,7 @@ namespace TEAMModelOS.Function
                         }
                         else
                         {
-                            //表示删除标签
+                            //琛ㄧず鍒犻櫎鏍囩�
                             item.category.RemoveAll(x => x.Equals(on._old));
                         }
                     });
@@ -580,7 +580,7 @@ namespace TEAMModelOS.Function
 
                     items.ForEach(item =>
                     {
-                        //修改知识点
+                        //修改知识点
                         if (!string.IsNullOrEmpty(on._new))
                         {
                             for (int i = 0; i < item.knowledge.Count; i++)
@@ -593,7 +593,7 @@ namespace TEAMModelOS.Function
                         }
                         else
                         {
-                            //表示删除知识点
+                            //表示删除知识点
                             item.knowledge.RemoveAll(x => x.Equals(on._old));
                         }
                     });
@@ -654,17 +654,17 @@ namespace TEAMModelOS.Function
                 var cosmosClient = _azureCosmos.GetCosmosClient();
 
                 DateTimeOffset dateTime = DateTimeOffset.UtcNow;
-                var dateHour = dateTime.ToString("yyyyMMddHH"); //获取当天的小时
-                var dateDay = dateTime.ToString("yyyyMMdd"); //获取当天的日期
-                var dateMonth = dateTime.ToString("yyyyMM");//获取当月的日期
-                var currentHour = dateTime.Hour;   //当前小时
-                var currentDay = dateTime.Day;   //当前天
-                long Expire = dateTime.AddHours(expire).ToUnixTimeMilliseconds();  //token到期时间
-                long now = dateTime.ToUnixTimeMilliseconds();   //当前时间戳
-                DateTime hour = DateTime.UtcNow.AddHours(25);   //25小时到期
-                DateTime month = DateTime.UtcNow.AddDays(32);   //一个月到期
-                var delTbHour = dateTime.AddHours(-168).ToString("yyyyMMddHH");   //168小时前
-                var delTbDay = dateTime.AddDays(-180).ToString("yyyyMMdd");   //180天前            
+                var dateHour = dateTime.ToString("yyyyMMddHH"); //获取当天的小时
+                var dateDay = dateTime.ToString("yyyyMMdd"); //获取当天的日期
+                var dateMonth = dateTime.ToString("yyyyMM");//获取当月的日期
+                var currentHour = dateTime.Hour;   //褰撳墠灏忔椂
+                var currentDay = dateTime.Day;   //当前天
+                long Expire = dateTime.AddHours(expire).ToUnixTimeMilliseconds();  //token鍒版湡鏃堕棿
+                long now = dateTime.ToUnixTimeMilliseconds();   //当前时间戳
+                DateTime hour = DateTime.UtcNow.AddHours(25);   //25灏忔椂鍒版湡
+                DateTime month = DateTime.UtcNow.AddDays(32);   //涓€涓�湀鍒版湡
+                var delTbHour = dateTime.AddHours(-168).ToString("yyyyMMddHH");   //168小时前
+                var delTbDay = dateTime.AddDays(-180).ToString("yyyyMMdd");   //180澶╁墠            
                 switch (scope)
                 {
                     case "teacher":
@@ -683,12 +683,12 @@ namespace TEAMModelOS.Function
                             //student.loginInfos = new List<LoginInfo>() { new LoginInfo { expire = Expire, ip = ip, time = now } };
                             //await cosmosClient.GetContainer("TEAMModelOS", Constant.Student).ReplaceItemAsync<Student>(student, student.id, new PartitionKey($"Base-{school}"));
                             string key = $"Login:School:{school}:student-day:{dateDay}";
-                            //记录一个学校每天每个学生登录的次数
+                            //璁板綍涓€涓��鏍℃瘡澶╂瘡涓��鐢熺櫥褰曠殑娆℃暟
                             await _azureRedis.GetRedisClient(8).SortedSetIncrementAsync(key, id, 1);
-                            //获取key到期的时间
-                            await _azureRedis.GetRedisClient(8).KeyExpireAsync(key, hour);  //设置到期时间25小时
+                            //获取key到期的时间
+                            await _azureRedis.GetRedisClient(8).KeyExpireAsync(key, hour);  //璁剧疆鍒版湡鏃堕棿25灏忔椂
                         }
-                        catch (Exception ex) { await _dingDing.SendBotMsg($"{ex.Message}{ex.StackTrace}", GroupNames.成都开发測試群組); }
+                        catch (Exception ex) { await _dingDing.SendBotMsg($"{ex.Message}{ex.StackTrace}", GroupNames.成都开发測試群組); }
                         break;
                     case "tmduser":
                         try
@@ -701,25 +701,25 @@ namespace TEAMModelOS.Function
                         break;
                 }
 
-                //天
+                //天
                 SortedSetEntry[] dayCnt = null;
-                //月
+                //月
                 SortedSetEntry[] monthCnt = null;
                 try
                 {
-                    await _azureRedis.GetRedisClient(8).SortedSetIncrementAsync($"Login:IES:{scope}:{dateDay}", $"{currentHour}", 1);//一天24小时  小时为单位
-                    await _azureRedis.GetRedisClient(8).SortedSetIncrementAsync($"Login:IES:{scope}:{dateMonth}", $"{currentDay}", 1); //一天的累计   天为单位
+                    await _azureRedis.GetRedisClient(8).SortedSetIncrementAsync($"Login:IES:{scope}:{dateDay}", $"{currentHour}", 1);//一天24小时  小时为单位
+                    await _azureRedis.GetRedisClient(8).SortedSetIncrementAsync($"Login:IES:{scope}:{dateMonth}", $"{currentDay}", 1); //涓€澶╃殑绱��   澶╀负鍗曚綅
 
                     var resDay = await _azureRedis.GetRedisClient(8).KeyTimeToLiveAsync($"Login:IES:{scope}:{dateDay}");
                     if (resDay == null)
-                        await _azureRedis.GetRedisClient(8).KeyExpireAsync($"Login:IES:{scope}:{dateDay}", hour);  //设置到期时间
+                        await _azureRedis.GetRedisClient(8).KeyExpireAsync($"Login:IES:{scope}:{dateDay}", hour);  //璁剧疆鍒版湡鏃堕棿
                     var rspMonth = await _azureRedis.GetRedisClient(8).KeyTimeToLiveAsync($"Login:IES:{scope}:{dateMonth}");
                     if (rspMonth == null)
-                        await _azureRedis.GetRedisClient(8).KeyExpireAsync($"Login:IES:{scope}:{dateMonth}", month);  //设置到期时间
+                        await _azureRedis.GetRedisClient(8).KeyExpireAsync($"Login:IES:{scope}:{dateMonth}", month);  //璁剧疆鍒版湡鏃堕棿
 
-                    //保存当前小时统计
+                    //淇濆瓨褰撳墠灏忔椂缁熻�
                     dayCnt = _azureRedis.GetRedisClient(8).SortedSetRangeByScoreWithScores($"Login:IES:{scope}:{dateDay}");
-                    //保存当前的统计数据
+                    //保存当前的统计数据
                     monthCnt = _azureRedis.GetRedisClient(8).SortedSetRangeByScoreWithScores($"Login:IES:{scope}:{dateMonth}");
                 }
                 catch { }
@@ -769,7 +769,7 @@ namespace TEAMModelOS.Function
                             }
                         }
                     }
-                    await table.SaveOrUpdateAll(hourLogins);  //保存和更新保存当前小时登录次数
+                    await table.SaveOrUpdateAll(hourLogins);  //保存和更新保存当前小时登录次数
                 }
                 if (monthCnt != null && monthCnt.Length > 0)
                 {
@@ -778,7 +778,7 @@ namespace TEAMModelOS.Function
                     {
                         if (((int)mCnt.Element) == currentDay)
                         {
-                            //保存当天的峰值
+                            //保存当天的峰值
                             var tbDays = await table.QueryWhereString<DayLogin>($"PartitionKey eq 'DayLogin' and RowKey eq '{dateDay}'");
                             if (tbDays.Count > 0)
                             {
@@ -795,7 +795,7 @@ namespace TEAMModelOS.Function
                             }
                             else
                             {
-                                //保存当月每天的峰值
+                                //保存当月每天的峰值
                                 DayLogin dayLogin = new() { PartitionKey = $"DayLogin", RowKey = dateDay, Day = currentDay };
                                 if (scope.Equals("teacher"))
                                 {
@@ -819,7 +819,7 @@ namespace TEAMModelOS.Function
                             }
                         }
                     }
-                    await table.SaveOrUpdateAll(dayLogins);// 保存当月每天在线数据
+                    await table.SaveOrUpdateAll(dayLogins);// 淇濆瓨褰撴湀姣忓ぉ鍦ㄧ嚎鏁版嵁
                 }
 
                 string tbHourSql = $"PartitionKey eq 'HourLogin' and RowKey le '{delTbHour}'";
@@ -827,32 +827,32 @@ namespace TEAMModelOS.Function
                 string tbDaySql = $"PartitionKey eq 'DayLogin' and RowKey le '{delTbDay}'";
                 try
                 {
-                    await table.DeleteStringWhere<HourLogin>(rowKey: tbHourSql);  //删除168小时前的数据
-                    await table.DeleteStringWhere<DayLogin>(rowKey: tbDaySql);   //删除180天前的数据
+                    await table.DeleteStringWhere<HourLogin>(rowKey: tbHourSql);  //鍒犻櫎168灏忔椂鍓嶇殑鏁版嵁
+                    await table.DeleteStringWhere<DayLogin>(rowKey: tbDaySql);   //删除180天前的数据
                 }
                 catch { }
 
                 if (!string.IsNullOrWhiteSpace(school))
                 {
-                    //天
+                    //天
                     SortedSetEntry[] scDayCnt = null;
-                    //月
+                    //月
                     SortedSetEntry[] scMonthCnt = null;
                     try
                     {
-                        await _azureRedis.GetRedisClient(8).SortedSetIncrementAsync($"Login:School:{school}:{scope}:{dateDay}", $"{currentHour}", 1);//当天当前小时在线人加1
-                        await _azureRedis.GetRedisClient(8).SortedSetIncrementAsync($"Login:School:{school}:{scope}:{dateMonth}", $"{currentDay}", 1); //当天的在线加1
+                        await _azureRedis.GetRedisClient(8).SortedSetIncrementAsync($"Login:School:{school}:{scope}:{dateDay}", $"{currentHour}", 1);//褰撳ぉ褰撳墠灏忔椂鍦ㄧ嚎浜哄姞1
+                        await _azureRedis.GetRedisClient(8).SortedSetIncrementAsync($"Login:School:{school}:{scope}:{dateMonth}", $"{currentDay}", 1); //褰撳ぉ鐨勫湪绾垮姞1
 
                         var reScDay = await _azureRedis.GetRedisClient(8).KeyTimeToLiveAsync($"Login:School:{school}:{scope}:{dateDay}");
                         if (reScDay == null)
-                            await _azureRedis.GetRedisClient(8).KeyExpireAsync($"Login:School:{school}:{scope}:{dateDay}", hour);  //设置到期时间
+                            await _azureRedis.GetRedisClient(8).KeyExpireAsync($"Login:School:{school}:{scope}:{dateDay}", hour);  //璁剧疆鍒版湡鏃堕棿
                         var reScMonth = await _azureRedis.GetRedisClient(8).KeyTimeToLiveAsync($"Login:School:{school}:{scope}:{dateMonth}");
                         if (reScMonth == null)
-                            await _azureRedis.GetRedisClient(8).KeyExpireAsync($"Login:School:{school}:{scope}:{dateMonth}", month);  //设置到期时间
+                            await _azureRedis.GetRedisClient(8).KeyExpireAsync($"Login:School:{school}:{scope}:{dateMonth}", month);  //璁剧疆鍒版湡鏃堕棿
 
-                        //保存学校当天每小时的
+                        //淇濆瓨瀛︽牎褰撳ぉ姣忓皬鏃剁殑
                         scDayCnt = _azureRedis.GetRedisClient(8).SortedSetRangeByScoreWithScores($"Login:School:{school}:{scope}:{dateDay}");
-                        //学校天峰值
+                        //学校天峰值
                         scMonthCnt = _azureRedis.GetRedisClient(8).SortedSetRangeByScoreWithScores($"Login:School:{school}:{scope}:{dateMonth}");
                     }
                     catch { }
@@ -880,7 +880,7 @@ namespace TEAMModelOS.Function
                                 }
                                 else
                                 {
-                                    //学校小时峰值
+                                    //学校小时峰值
                                     HourLoginSchool hourLoginSc = new() { PartitionKey = $"HourLogin-{school}", RowKey = dateHour, Hour = currentHour, School = school };
                                     if (scope.Equals("teacher"))
                                     {
@@ -929,7 +929,7 @@ namespace TEAMModelOS.Function
                                 }
                                 else
                                 {
-                                    //学校天峰值
+                                    //学校天峰值
                                     DayLoginSchool dayLoginSc = new() { PartitionKey = $"DayLogin-{school}", RowKey = dateDay, Day = currentDay, School = school };
                                     if (scope.Equals("teacher"))
                                     {
@@ -954,7 +954,7 @@ namespace TEAMModelOS.Function
                                 }
                             }
                         }
-                        await table.SaveOrUpdateAll(DayLoginSchools);//保存学校当月在线数据
+                        await table.SaveOrUpdateAll(DayLoginSchools);//淇濆瓨瀛︽牎褰撴湀鍦ㄧ嚎鏁版嵁
                     }
 
                     string tbScHourSql = $"PartitionKey eq 'HourLogin-{school}' and RowKey le '{delTbHour}'";
@@ -962,7 +962,7 @@ namespace TEAMModelOS.Function
                     if (scHourLog.Count > 0)
                         try
                         {
-                            //await table.DeleteStringWhere<HourLogin>(tbScHourSql); //删除学校168小时前的数据
+                            //await table.DeleteStringWhere<HourLogin>(tbScHourSql); //鍒犻櫎瀛︽牎168灏忔椂鍓嶇殑鏁版嵁
                             await table.DeleteAll(scHourLog);
                         }
                         catch { }
@@ -971,7 +971,7 @@ namespace TEAMModelOS.Function
                     if (scDayLog.Count > 0)
                         try
                         {
-                            //await table.DeleteStringWhere<DayLogin>(tbScDaySql); //删除学校180天前的数据
+                            //await table.DeleteStringWhere<DayLogin>(tbScDaySql); //删除学校180天前的数据
                             await table.DeleteAll(scDayLog);
                         }
                         catch { }
@@ -981,7 +981,7 @@ namespace TEAMModelOS.Function
             }
             catch (Exception ex)
             {
-                await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}-online-record 人数记录异常{ex.Message}\n{ex.StackTrace}", GroupNames.成都开发測試群組);
+                await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}-online-record 人数记录异常{ex.Message}\n{ex.StackTrace}", GroupNames.成都开发測試群組);
                 return new OkObjectResult(new { data = json });
             }
         }

+ 160 - 160
TEAMModelOS.Function/IESServiceBusTrigger.cs

@@ -1,4 +1,4 @@
-using System;
+锘縰sing System;
 using System.Threading.Tasks;
 using Azure.Messaging.ServiceBus;
 using DinkToPdf.Contracts;
@@ -98,11 +98,11 @@ namespace TEAMModelOS.Function
             }
             catch (CosmosException e)
             {
-                await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}-ServiceBus,ExamBus()-CosmosDB异常{e.Message}\n{e.StackTrace}\n{e.Status}\n{json.RootElement.ToJsonString()}", GroupNames.醍摩豆服務運維群組);
+                await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}-ServiceBus,ExamBus()-CosmosDB异常{e.Message}\n{e.StackTrace}\n{e.Status}\n{json.RootElement.ToJsonString()}", GroupNames.醍摩豆服務運維群組);
             }
             catch (Exception ex)
             {
-                await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}-ServiceBus,ExamBus()\n{ex.Message}\n{ex.StackTrace}\n\n{json.RootElement.ToJsonString()}", GroupNames.醍摩豆服務運維群組);
+                await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}-ServiceBus,ExamBus()\n{ex.Message}\n{ex.StackTrace}\n\n{json.RootElement.ToJsonString()}", GroupNames.醍摩豆服務運維群組);
             }
             finally
             {  // Complete the message
@@ -138,11 +138,11 @@ namespace TEAMModelOS.Function
             }
             catch (CosmosException e)
             {
-                await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}-ServiceBus,VoteBus()-CosmosDB异常{e.Message}\n{e.StackTrace}\n{e.Status}\n{jsonMsg.RootElement.ToJsonString()}", GroupNames.醍摩豆服務運維群組);
+                await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}-ServiceBus,VoteBus()-CosmosDB异常{e.Message}\n{e.StackTrace}\n{e.Status}\n{jsonMsg.RootElement.ToJsonString()}", GroupNames.醍摩豆服務運維群組);
             }
             catch (Exception ex)
             {
-                await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}-ServiceBus,VoteBus()\n{ex.Message}\n{ex.StackTrace}\n\n{jsonMsg.RootElement.ToJsonString()}", GroupNames.醍摩豆服務運維群組);
+                await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}-ServiceBus,VoteBus()\n{ex.Message}\n{ex.StackTrace}\n\n{jsonMsg.RootElement.ToJsonString()}", GroupNames.醍摩豆服務運維群組);
             }
             finally
             {  // Complete the message
@@ -179,11 +179,11 @@ namespace TEAMModelOS.Function
             }
             catch (CosmosException e)
             {
-                await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}-ServiceBus,Correct()-CosmosDB异常{e.Message}\n{e.StackTrace}\n{e.Status}\n{jsonMsg.RootElement.ToJsonString()}", GroupNames.醍摩豆服務運維群組);
+                await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}-ServiceBus,Correct()-CosmosDB异常{e.Message}\n{e.StackTrace}\n{e.Status}\n{jsonMsg.RootElement.ToJsonString()}", GroupNames.醍摩豆服務運維群組);
             }
             catch (Exception ex)
             {
-                await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}-ServiceBus,Correct()\n{ex.Message}\n{ex.StackTrace}\n\n{jsonMsg.RootElement.ToJsonString()}", GroupNames.醍摩豆服務運維群組);
+                await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}-ServiceBus,Correct()\n{ex.Message}\n{ex.StackTrace}\n\n{jsonMsg.RootElement.ToJsonString()}", GroupNames.醍摩豆服務運維群組);
             }
             finally
             {  // Complete the message
@@ -220,11 +220,11 @@ namespace TEAMModelOS.Function
             }
             catch (CosmosException e)
             {
-                await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}-ServiceBus,SurveyBus()-CosmosDB异常{e.Message}\n{e.StackTrace}\n{e.Status}\n{jsonMsg.RootElement.ToJsonString()}", GroupNames.醍摩豆服務運維群組);
+                await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}-ServiceBus,SurveyBus()-CosmosDB异常{e.Message}\n{e.StackTrace}\n{e.Status}\n{jsonMsg.RootElement.ToJsonString()}", GroupNames.醍摩豆服務運維群組);
             }
             catch (Exception ex)
             {
-                await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}-ServiceBus,SurveyBus()\n{ex.Message}\n{ex.StackTrace}\n\n{jsonMsg.RootElement.ToJsonString()}", GroupNames.醍摩豆服務運維群組);
+                await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}-ServiceBus,SurveyBus()\n{ex.Message}\n{ex.StackTrace}\n\n{jsonMsg.RootElement.ToJsonString()}", GroupNames.醍摩豆服務運維群組);
             }
             finally
             {  // Complete the message
@@ -261,11 +261,11 @@ namespace TEAMModelOS.Function
             }
             catch (CosmosException e)
             {
-                await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}-ServiceBus,Homework()-CosmosDB异常{e.Message}\n{e.StackTrace}\n{e.Status}\n{jsonMsg.RootElement.ToJsonString()}", GroupNames.醍摩豆服務運維群組);
+                await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}-ServiceBus,Homework()-CosmosDB异常{e.Message}\n{e.StackTrace}\n{e.Status}\n{jsonMsg.RootElement.ToJsonString()}", GroupNames.醍摩豆服務運維群組);
             }
             catch (Exception ex)
             {
-                await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}-ServiceBus,Homework()\n{ex.Message}\n{ex.StackTrace}\n\n{jsonMsg.RootElement.ToJsonString()}", GroupNames.醍摩豆服務運維群組);
+                await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}-ServiceBus,Homework()\n{ex.Message}\n{ex.StackTrace}\n\n{jsonMsg.RootElement.ToJsonString()}", GroupNames.醍摩豆服務運維群組);
             }
             finally
             {  // Complete the message
@@ -303,11 +303,11 @@ namespace TEAMModelOS.Function
             }
             catch (CosmosException e)
             {
-                await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}-ServiceBus,Study()-CosmosDB异常{e.Message}\n{e.StackTrace}\n{e.Status}\n{jsonMsg.RootElement.ToJsonString()}", GroupNames.醍摩豆服務運維群組);
+                await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}-ServiceBus,Study()-CosmosDB异常{e.Message}\n{e.StackTrace}\n{e.Status}\n{jsonMsg.RootElement.ToJsonString()}", GroupNames.醍摩豆服務運維群組);
             }
             catch (Exception ex)
             {
-                await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}-ServiceBus,Study()\n{ex.Message}\n{ex.StackTrace}\n\n{jsonMsg.RootElement.ToJsonString()}", GroupNames.醍摩豆服務運維群組);
+                await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}-ServiceBus,Study()\n{ex.Message}\n{ex.StackTrace}\n\n{jsonMsg.RootElement.ToJsonString()}", GroupNames.醍摩豆服務運維群組);
             }
             finally
             {  // Complete the message
@@ -345,11 +345,11 @@ namespace TEAMModelOS.Function
             }
             catch (CosmosException e)
             {
-                await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}-ServiceBus,Art()-CosmosDB异常{e.Message}\n{e.StackTrace}\n{e.Status}\n{jsonMsg.RootElement.ToJsonString()}", GroupNames.醍摩豆服務運維群組);
+                await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}-ServiceBus,Art()-CosmosDB异常{e.Message}\n{e.StackTrace}\n{e.Status}\n{jsonMsg.RootElement.ToJsonString()}", GroupNames.醍摩豆服務運維群組);
             }
             catch (Exception ex)
             {
-                await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}-ServiceBus,Art()\n{ex.Message}\n{ex.StackTrace}\n\n{jsonMsg.RootElement.ToJsonString()}", GroupNames.醍摩豆服務運維群組);
+                await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}-ServiceBus,Art()\n{ex.Message}\n{ex.StackTrace}\n\n{jsonMsg.RootElement.ToJsonString()}", GroupNames.醍摩豆服務運維群組);
             }
             finally
             {  // Complete the message
@@ -385,11 +385,11 @@ namespace TEAMModelOS.Function
             }
             catch (CosmosException e)
             {
-                await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}-ServiceBus,ExamLite()-CosmosDB异常{e.Message}\n{e.StackTrace}\n{e.Status}\n{jsonMsg.RootElement.ToJsonString()}", GroupNames.醍摩豆服務運維群組);
+                await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}-ServiceBus,ExamLite()-CosmosDB异常{e.Message}\n{e.StackTrace}\n{e.Status}\n{jsonMsg.RootElement.ToJsonString()}", GroupNames.醍摩豆服務運維群組);
             }
             catch (Exception ex)
             {
-                await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}-ServiceBus,ExamLite()\n{ex.Message}\n{ex.StackTrace}\n\n{jsonMsg.RootElement.ToJsonString()}", GroupNames.醍摩豆服務運維群組);
+                await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}-ServiceBus,ExamLite()\n{ex.Message}\n{ex.StackTrace}\n\n{jsonMsg.RootElement.ToJsonString()}", GroupNames.醍摩豆服務運維群組);
             }
             finally
             {  // Complete the message
@@ -419,12 +419,12 @@ namespace TEAMModelOS.Function
                 var client = _azureCosmos.GetCosmosClient();
 
                 List<TeacherTrain> trains = new List<TeacherTrain>();
-                //redis锁
+                //redis锁
                 bool lockKey = await _azureRedis.GetRedisClient(8).KeyExistsAsync($"Train:Statistics:Lock:{data.areaId}");
                 if (!lockKey)
                 {
                     await _azureRedis.GetRedisClient(8).SetAddAsync($"Train:Statistics:Lock:{data.areaId}", new RedisValue(data.areaId));
-                    DateTime minutes = DateTime.UtcNow.AddMinutes(15);   //15分钟 
+                    DateTime minutes = DateTime.UtcNow.AddMinutes(15);   //15鍒嗛挓 
                     await _azureRedis.GetRedisClient(8).KeyExpireAsync($"Train:Statistics:Lock:{data.areaId}", minutes);
                     Area area = await client.GetContainer(Constant.TEAMModelOS, "Normal").ReadItemAsync<Area>($"{data.areaId}", new PartitionKey("Base-Area"));
                     AreaSetting setting = null;
@@ -477,7 +477,7 @@ namespace TEAMModelOS.Function
             }
             catch (Exception ex)
             {
-                await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}-TeacherTrainChange\n{ex.Message}\n{ex.StackTrace}\n\n{message.Body}", GroupNames.醍摩豆服務運維群組);
+                await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}-TeacherTrainChange\n{ex.Message}\n{ex.StackTrace}\n\n{message.Body}", GroupNames.醍摩豆服務運維群組);
             }
             finally
             {  // Complete the message
@@ -485,7 +485,7 @@ namespace TEAMModelOS.Function
             }
         }
         /// <summary>
-        /// 完善课程变更,StuListChange,  originCode是学校编码 则表示名单是学校自定义名单,如果是tmdid则表示醍摩豆的私有名单,scope=school,private。
+        /// 完善课程变更,StuListChange,  originCode是学校编码 则表示名单是学校自定义名单,如果是tmdid则表示醍摩豆的私有名单,scope=school,private。
         /// </summary>
         /// <data msg>
         /// CourseChange
@@ -509,8 +509,8 @@ namespace TEAMModelOS.Function
 
                 _backgroundWorkerQueue.QueueBackgroundWorkItem(async task => {
 
-                    //await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}-名单成员变更-GroupChange\n{msg}", GroupNames.醍摩豆服務運維群組);
-                    //await _dingDing.SendBotMsg($"名单变化{msg}", GroupNames.成都开发測試群組);
+                    //await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}-名单成员变更-GroupChange\n{msg}", GroupNames.醍摩豆服務運維群組);
+                    //await _dingDing.SendBotMsg($"名单变化{msg}", GroupNames.成都开发測試群組);
 
                     int add = groupChange.tmdjoin.Count-groupChange.tmdleave.Count+groupChange.stujoin.Count-groupChange.stuleave.Count;
                     if (groupChange.scope.Equals("private") && (groupChange.type.Equals("student") || groupChange.type.Equals("class") || groupChange.type.Equals("teach")))
@@ -521,39 +521,39 @@ namespace TEAMModelOS.Function
                     {
                         await SystemService.RecordAccumulateData(_azureRedis, _dingDing, new Accumulate { client=groupChange.client, count=add, id= groupChange.listid, scope="school", key= "grouplist", name=groupChange.name, target=groupChange.school });
                     }
-                    //名单变动修改学生课程关联信息
+                    //鍚嶅崟鍙樺姩淇�敼瀛︾敓璇剧▼鍏宠仈淇℃伅
                     //await StuListService.FixStuCourse(client, stuListChange);
-                    //Vote投票 Survey问卷 Exam评测 Learn学习活动 Homework作业活动
-                    //名单变动修改学生问卷关联信息
+                    //Vote鎶曠エ Survey闂�嵎 Exam璇勬祴 Learn瀛︿範娲诲姩 Homework浣滀笟娲诲姩
+                    //鍚嶅崟鍙樺姩淇�敼瀛︾敓闂�嵎鍏宠仈淇℃伅
                     //await IESActivityService.FixActivity(client, _dingDing, groupChange, "Survey");
-                    //名单变动修改学生投票关联信息
+                    //鍚嶅崟鍙樺姩淇�敼瀛︾敓鎶曠エ鍏宠仈淇℃伅
                     //await IESActivityService.FixActivity(client, _dingDing, groupChange, "Vote");
-                    //名单变动修改学生评测关联信息
+                    //鍚嶅崟鍙樺姩淇�敼瀛︾敓璇勬祴鍏宠仈淇℃伅
                     //await IESActivityService.FixActivity(client, _dingDing, groupChange, "Exam");
-                    //名单变动修改学生研修关联信息
+                    //鍚嶅崟鍙樺姩淇�敼瀛︾敓鐮斾慨鍏宠仈淇℃伅
                     //await IESActivityService.FixActivity(client, _dingDing, groupChange, "Study");
-                    //名单变动修改学生简易评测关联信息
+                    //名单变动修改学生简易评测关联信息
                     //await IESActivityService.FixActivity(client, _dingDing, groupChange, "ExamLite");
-                    //名单变动修改学生作业活动信息
+                    //鍚嶅崟鍙樺姩淇�敼瀛︾敓浣滀笟娲诲姩淇℃伅
                     //await IESActivityService.FixActivity(client, _dingDing, groupChange, "Homework");
-                    //名单变动修改学生艺术评价活动信息
+                    //鍚嶅崟鍙樺姩淇�敼瀛︾敓鑹烘湳璇勪环娲诲姩淇℃伅
                     //await IESActivityService.FixActivity(client, _dingDing, groupChange, "Art");
-                    //TODO学习活动
+                    //TODO瀛︿範娲诲姩
                     //await FixActivity(client, stuListChange, "Learn");
                     if (groupChange.type == null || !groupChange.type.Equals("research") || !groupChange.type.Equals("yxtrain") || !groupChange.type.Equals("activity"))
                     {
-                        //课程名单变动修改学生课程关联信息
+                        //璇剧▼鍚嶅崟鍙樺姩淇�敼瀛︾敓璇剧▼鍏宠仈淇℃伅
                         // await IESActivityService.FixStuCourse(client, _dingDing, groupChange);
-                        //名单变动修改课例关联信息
+                        //鍚嶅崟鍙樺姩淇�敼璇句緥鍏宠仈淇℃伅
                         //await ActivityService.FixLessonRecord(client, _dingDing, groupChange);
                     }
                     if (groupChange.type.Equals("class") || groupChange.type.Equals("teach") || groupChange.type.Equals("student"))
                     {
                         await _httpTrigger.RequestHttpTrigger(new { data = groupChange }, Environment.GetEnvironmentVariable("Option:Location"), "webhook/group-member-change");
                         if (groupChange.stujoin.Count > 0)
-                            await BIStats.SetTypeAddStats(client, _dingDing, groupChange.school, "Student", groupChange.stujoin.Count);//BI统计增/减量
+                            await BIStats.SetTypeAddStats(client, _dingDing, groupChange.school, "Student", groupChange.stujoin.Count);//BI统计增/减量
                         if (groupChange.stuleave.Count > 0)
-                            await BIStats.SetTypeAddStats(client, _dingDing, groupChange.school, "Student", -groupChange.stuleave.Count);//BI统计增/减量
+                            await BIStats.SetTypeAddStats(client, _dingDing, groupChange.school, "Student", -groupChange.stuleave.Count);//BI统计增/减量
                     }
                     if ((groupChange.type.Equals("class") || groupChange.type.Equals("teach") || groupChange.type.Equals("student"))  && "school".Equals(groupChange.scope) &&  "upsert".Equals(groupChange.status) && !string.IsNullOrWhiteSpace(groupChange.school))
                     {
@@ -585,7 +585,7 @@ namespace TEAMModelOS.Function
             }
             catch (Exception ex)
             {
-                await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}-GroupChange\n{ex.Message}\n{ex.StackTrace}\n\n{jsonMsg.RootElement.ToJsonString()}", GroupNames.醍摩豆服務運維群組);
+                await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}-GroupChange\n{ex.Message}\n{ex.StackTrace}\n\n{jsonMsg.RootElement.ToJsonString()}", GroupNames.醍摩豆服務運維群組);
             }
             finally
             {  // Complete the message
@@ -608,7 +608,7 @@ namespace TEAMModelOS.Function
             _logger.LogInformation("Message ID: {id}", message.MessageId);
             _logger.LogInformation("Message Body: {body}", message.Body);
             _logger.LogInformation("Message Content-Type: {contentType}", message.ContentType);
-            await _dingDing.SendBotMsg($"{message.Body}", GroupNames.成都开发測試群組);
+            await _dingDing.SendBotMsg($"{message.Body}", GroupNames.成都开发測試群組);
             // Complete the message
             await messageActions.CompleteMessageAsync(message);
         }
@@ -689,11 +689,11 @@ namespace TEAMModelOS.Function
             }
             catch (CosmosException ex)
             {
-                await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}-ServiceBus,ItemCond()\n{ex.Message}\n{ex.StackTrace}\n\n{jsonMsg.RootElement.ToJsonString()}", GroupNames.醍摩豆服務運維群組);
+                await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}-ServiceBus,ItemCond()\n{ex.Message}\n{ex.StackTrace}\n\n{jsonMsg.RootElement.ToJsonString()}", GroupNames.醍摩豆服務運維群組);
             }
             catch (Exception ex)
             {
-                await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}-ServiceBus,ItemCond()\n{ex.Message}\n{ex.StackTrace}\n\n{jsonMsg.RootElement.ToJsonString()}", GroupNames.醍摩豆服務運維群組);
+                await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}-ServiceBus,ItemCond()\n{ex.Message}\n{ex.StackTrace}\n\n{jsonMsg.RootElement.ToJsonString()}", GroupNames.醍摩豆服務運維群組);
             }
             finally
             {  // Complete the message
@@ -726,8 +726,8 @@ namespace TEAMModelOS.Function
                 jsonMsg.RootElement.TryGetProperty("prodId", out JsonElement prodId);
                 var client = _azureCosmos.GetCosmosClient();
                 string strQuery = string.Empty;
-                //取得所有學校產品
-                ////序號
+                //取得所有學校產品
+                ////搴忚櫉
                 List<SchoolProductSumData> serialsProductSumOrg = new List<SchoolProductSumData>();
                 strQuery = $"SELECT * FROM c WHERE c.dataType = 'serial'";
                 await foreach (var item in client.GetContainer(Constant.TEAMModelOS, "School").GetItemQueryStreamIterator(queryText: strQuery, requestOptions: new QueryRequestOptions() { PartitionKey = new Azure.Cosmos.PartitionKey($"Product-{schoolId}") }))
@@ -758,9 +758,9 @@ namespace TEAMModelOS.Function
                         }
                     }
                 }
-                ////服務
+                ////鏈嶅嫏
                 List<SchoolProductSumDataService> servicesProductSumOrg = new List<SchoolProductSumDataService>();
-                //////取得學校產品 授權週期:授權中 條件: startDate <= now <= endDate
+                //////取得學校產品 授權週期:授權中 條件: startDate <= now <= endDate
                 long timestampToday = DateTimeOffset.UtcNow.ToUnixTimeSeconds();
                 string strQueryM = $"SELECT * FROM c WHERE c.dataType = 'servicePeriod' AND c.startDate <= {timestampToday} AND {timestampToday} <= c.endDate AND c.ttl < 0";
                 await foreach (var item in client.GetContainer(Constant.TEAMModelOS, "School").GetItemQueryStreamIterator(queryText: strQueryM, requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey($"Product-{schoolId}") }))
@@ -794,18 +794,18 @@ namespace TEAMModelOS.Function
                     }
 
                 }
-                ////服務產品特別對應項
-                School school = await client.GetContainer(Constant.TEAMModelOS, "School").ReadItemAsync<School>($"{schoolId}", new PartitionKey("Base")); //學校基本資料取得
-                bool updSchool = false; //是否變更學校基本資料
-                int chgSchSizeCnt = 0; //變更學校空間的次數 若為0表示現時間點沒有任何空間可使用 => 回復學校空間為初始值
-                int schoolDefaultSize = 1; //學校空間初始值:1
+                ////服務產品特別對應項
+                School school = await client.GetContainer(Constant.TEAMModelOS, "School").ReadItemAsync<School>($"{schoolId}", new PartitionKey("Base")); //瀛告牎鍩烘湰璩囨枡鍙栧緱
+                bool updSchool = false; //鏄�惁璁婃洿瀛告牎鍩烘湰璩囨枡
+                int chgSchSizeCnt = 0; //變更學校空間的次數 若為0表示現時間點沒有任何空間可使用 => 回復學校空間為初始值
+                int schoolDefaultSize = 1; //學校空間初始值:1
                 if (!string.IsNullOrWhiteSpace(school.id))
                 {
                     if (servicesProductSumOrg.Count > 0)
                     {
                         foreach (SchoolProductSumDataService servicesProductSumOrgRow in servicesProductSumOrg)
                         {
-                            //更新學校空間
+                            //鏇存柊瀛告牎绌洪枔
                             if (servicesProductSumOrgRow.prodCode.Equals("IPALJ6NY"))
                             {
                                 school.size = (servicesProductSumOrgRow.avaliable < 1) ? 1 : servicesProductSumOrgRow.avaliable;
@@ -818,17 +818,17 @@ namespace TEAMModelOS.Function
                     if (chgSchSizeCnt.Equals(0) && !school.size.Equals(schoolDefaultSize))
                     {
                         school.size = schoolDefaultSize;
-                        //updSchool = true; //關於學校空間初始式樣未定,目前暫定:若需要Reset空間,則先維持原空間數不更動
+                        //updSchool = true; //闂滄柤瀛告牎绌洪枔鍒濆�寮忔ǎ鏈�畾锛岀洰鍓嶆毇瀹氾細鑻ラ渶瑕丷eset绌洪枔锛屽墖鍏堢董鎸佸師绌洪枔鏁镐笉鏇村嫊
                         updSchool = false;
                     }
                 }
-                //變更學校基本資料
+                //璁婃洿瀛告牎鍩烘湰璩囨枡
                 if (updSchool)
                 {
                     await client.GetContainer(Constant.TEAMModelOS, "School").ReplaceItemAsync<School>(school, $"{schoolId}", new PartitionKey("Base"));
                 }
 
-                ////硬體
+                ////纭�珨
                 List<SchoolProductSumDataHard> hardsProductSumOrg = new List<SchoolProductSumDataHard>();
                 strQuery = $"SELECT * FROM c WHERE c.dataType = 'hard'";
                 await foreach (var item in client.GetContainer(Constant.TEAMModelOS, "School").GetItemQueryStreamIterator(queryText: strQuery, requestOptions: new QueryRequestOptions() { PartitionKey = new Azure.Cosmos.PartitionKey($"Product-{schoolId}") }))
@@ -860,7 +860,7 @@ namespace TEAMModelOS.Function
                         }
                     }
                 }
-                //更新學校產品一覽表
+                //鏇存柊瀛告牎鐢㈠搧涓€瑕借〃
                 SchoolProductSum prodSum = await client.GetContainer(Constant.TEAMModelOS, "School").ReadItemAsync<SchoolProductSum>(schoolId.ToString(), new PartitionKey($"ProductSum"));
                 prodSum.serial = serialsProductSumOrg;
                 prodSum.service = servicesProductSumOrg;
@@ -869,11 +869,11 @@ namespace TEAMModelOS.Function
             }
             catch (CosmosException ex)
             {
-                await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}-ServiceBus,Product()\n{ex.Message}\n{ex.StackTrace}\n\n{jsonMsg.RootElement.ToJsonString()}", GroupNames.醍摩豆服務運維群組);
+                await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}-ServiceBus,Product()\n{ex.Message}\n{ex.StackTrace}\n\n{jsonMsg.RootElement.ToJsonString()}", GroupNames.醍摩豆服務運維群組);
             }
             catch (Exception ex)
             {
-                await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}-ServiceBus,Product()\n{ex.Message}\n{ex.StackTrace}\n\n{jsonMsg.RootElement.ToJsonString()}", GroupNames.醍摩豆服務運維群組);
+                await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}-ServiceBus,Product()\n{ex.Message}\n{ex.StackTrace}\n\n{jsonMsg.RootElement.ToJsonString()}", GroupNames.醍摩豆服務運維群組);
             }
             finally
             {
@@ -884,7 +884,7 @@ namespace TEAMModelOS.Function
 
 
         /// <summary>
-        /// 更新开课数据事件
+        /// 更新开课数据事件
         /// </summary>
         /// <param name="msg"></param>
         /// <returns></returns>
@@ -910,7 +910,7 @@ namespace TEAMModelOS.Function
             {
                 _backgroundWorkerQueue.QueueBackgroundWorkItem(async task => {
 
-                    //更新课堂记录
+                    //鏇存柊璇惧爞璁板綍
                     if (data.TryGetProperty("lesson_id", out JsonElement _lessonId) && !string.IsNullOrEmpty($"{_lessonId}"))
                     {
                         if (!data.TryGetProperty("tmdid", out JsonElement _tmdid)) return;
@@ -923,7 +923,7 @@ namespace TEAMModelOS.Function
                         lessonId = $"{_lessonId}";
                         updates = _grant_types.ToObject<List<LessonUpdate>>();
 
-                    }//创建课堂记录
+                    }//鍒涘缓璇惧爞璁板綍
                     else if (data.TryGetProperty("id", out JsonElement _id) && !string.IsNullOrEmpty($"{_id}")
                         && data.TryGetProperty("tmdid", out JsonElement _tmdid) && !string.IsNullOrEmpty($"{_tmdid}")
                         && data.TryGetProperty("scope", out JsonElement _scope) && !string.IsNullOrEmpty($"{_scope}"))
@@ -934,7 +934,7 @@ namespace TEAMModelOS.Function
                         tmdid = $"{_tmdid}";
                         lessonId = $"{_id}";
                         updates.Add(new LessonUpdate { grant_type = "create" });
-                    }//删除课堂记录
+                    }//鍒犻櫎璇惧爞璁板綍
                     else if (data.TryGetProperty("delete_id", out JsonElement _delete_id) && !string.IsNullOrEmpty($"{_delete_id}")
                         && data.TryGetProperty("tmdid", out JsonElement _dtmdid) && !string.IsNullOrEmpty($"{_dtmdid}")
                         && data.TryGetProperty("scope", out JsonElement _dscope) && !string.IsNullOrEmpty($"{_dscope}")
@@ -957,7 +957,7 @@ namespace TEAMModelOS.Function
                     }
                     //if (!string.IsNullOrWhiteSpace(school) && school.Equals("habook"))
                     //{
-                    //    await _dingDing.SendBotMsg($"研发学校课堂记录事件触发:\n{msg}", GroupNames.成都开发測試群組);
+                    //    await _dingDing.SendBotMsg($"研发学校课堂记录事件触发:\n{msg}", GroupNames.成都开发測試群組);
                     //}
                     var client = _azureCosmos.GetCosmosClient();
 
@@ -1002,7 +1002,7 @@ namespace TEAMModelOS.Function
                         {
                             switch (update.grant_type)
                             {
-                                //更新课堂时长
+                                //鏇存柊璇惧爞鏃堕暱
                                 case "up-duration":
                                     double.TryParse($"{update.data}", out double duration);
                                     lessonRecord.duration = duration;
@@ -1026,38 +1026,38 @@ namespace TEAMModelOS.Function
                                     }
                                     catch (Exception ex)
                                     {
-                                        // await _dingDing.SendBotMsg($"{_option.Location}/LessonRecordEvent/课堂记录更新课堂时长出错records/{_lessonId}/Record/.Recording.json\n{ex.Message}\n{ex.StackTrace}{msg}", GroupNames.醍摩豆服務運維群組);
+                                        // await _dingDing.SendBotMsg($"{_option.Location}/LessonRecordEvent/课堂记录更新课堂时长出错records/{_lessonId}/Record/.Recording.json\n{ex.Message}\n{ex.StackTrace}{msg}", GroupNames.醍摩豆服務運維群組);
                                     }
                                     isReplace = true;
                                     break;
-                                //更新T分
+                                //更新T分
                                 case "up-tScore":
                                     var tScore = int.Parse($"{update.data}");
                                     lessonRecord.tScore = tScore;
                                     msgs.Add(update);
                                     break;
-                                //更新课P分
+                                //更新课P分
                                 case "up-pScore":
                                     var pScore = int.Parse($"{update.data}");
                                     lessonRecord.pScore = pScore;
                                     msgs.Add(update);
                                     break;
-                                //更新 学生人数
+                                //鏇存柊 瀛︾敓浜烘暟
                                 case "up-mCount":
                                     var mCount = int.Parse($"{update.data}");
                                     lessonRecord.mCount = mCount;
                                     msgs.Add(update);
                                     break;
-                                //更新 议课次数
+                                //鏇存柊 璁��娆℃暟
                                 case "up-techCount":
                                     var techCount = int.Parse($"{update.data}");
                                     lessonRecord.mCount = techCount;
                                     msgs.Add(update);
                                     break;
-                                //更新 基础统计信息
+                                //鏇存柊 鍩虹�缁熻�淇℃伅
                                 case "up-base":
 
-                                    //读取TimeLine.json
+                                    //璇诲彇TimeLine.json
                                     List<int> PickupMemberIds = new List<int>();
                                     try
                                     {
@@ -1079,10 +1079,10 @@ namespace TEAMModelOS.Function
                                     {
                                         if (!ex.Message.Contains("The specified blob does not exist"))
                                         {
-                                            await _dingDing.SendBotMsg($"{_option.Location},TimeLine.json转换异常,{ex.Message}{ex.StackTrace},{lessonRecord.id}", GroupNames.成都开发測試群組);
+                                            await _dingDing.SendBotMsg($"{_option.Location},TimeLine.json转换异常,{ex.Message}{ex.StackTrace},{lessonRecord.id}", GroupNames.成都开发測試群組);
                                         }
                                     }
-                                    //读取Task.json
+                                    //璇诲彇Task.json
                                     List<TaskData> taskDatas = new List<TaskData>();
                                     try
                                     {
@@ -1093,10 +1093,10 @@ namespace TEAMModelOS.Function
                                     {
                                         if (!ex.Message.Contains("The specified blob does not exist"))
                                         {
-                                            await _dingDing.SendBotMsg($"{_option.Location},Task.json转换异常,{ex.Message}{ex.StackTrace},{lessonRecord.id}", GroupNames.成都开发測試群組);
+                                            await _dingDing.SendBotMsg($"{_option.Location},Task.json转换异常,{ex.Message}{ex.StackTrace},{lessonRecord.id}", GroupNames.成都开发測試群組);
                                         }
                                     }
-                                    //读取IRS.json
+                                    //璇诲彇IRS.json
                                     List<IRSData> iRSDatas = new List<IRSData>();
                                     try
                                     {
@@ -1108,14 +1108,14 @@ namespace TEAMModelOS.Function
                                     {
                                         if (!ex.Message.Contains("The specified blob does not exist"))
                                         {
-                                            await _dingDing.SendBotMsg($"{_option.Location},IRS.json转换异常,{ex.Message}{ex.StackTrace},{lessonRecord.id}", GroupNames.成都开发測試群組);
+                                            await _dingDing.SendBotMsg($"{_option.Location},IRS.json转换异常,{ex.Message}{ex.StackTrace},{lessonRecord.id}", GroupNames.成都开发測試群組);
                                         }
                                     }
 
-                                    //如果有更新 则去读取/{_lessonId}/IES/base.json
+                                    //如果有更新 则去读取/{_lessonId}/IES/base.json
                                     try
                                     {
-                                        // await _dingDing.SendBotMsg($"{_option.Location},课堂id:{_lessonId} 收到更新", GroupNames.醍摩豆服務運維群組);
+                                        // await _dingDing.SendBotMsg($"{_option.Location},课堂id:{_lessonId} 收到更新", GroupNames.醍摩豆服務運維群組);
                                         BlobDownloadResult baseblobDownload = await _azureStorage.GetBlobContainerClient(blobname).GetBlobClient($"/records/{_lessonId}/IES/base.json").DownloadContentAsync();
                                         //attendState
                                         string basejson = baseblobDownload.Content.ToString().Replace("\"Uncall\"", "0").Replace("Uncall", "0");
@@ -1126,10 +1126,10 @@ namespace TEAMModelOS.Function
                                         }
                                         catch (Exception ex)
                                         {
-                                            await _dingDing.SendBotMsg($"{_option.Location},base.json转换异常,{ex.Message}{ex.StackTrace}{basejson},{lessonRecord.id}", GroupNames.成都开发測試群組);
+                                            await _dingDing.SendBotMsg($"{_option.Location},base.json转换异常,{ex.Message}{ex.StackTrace}{basejson},{lessonRecord.id}", GroupNames.成都开发測試群組);
                                             //lessonBase = baseblobDownload.Content.ToObjectFromJson<LessonBase>();
                                         }
-                                        //await  _dingDing.SendBotMsg($"课例记录文件base.json:{lessonBase.ToJsonString()}", GroupNames.成都开发測試群組);
+                                        //await  _dingDing.SendBotMsg($"课例记录文件base.json:{lessonBase.ToJsonString()}", GroupNames.成都开发測試群組);
                                         if (lessonBase != null && lessonBase.summary != null)
                                         {
                                             //lessonRecord.name = lessonBase.summary.activityName;
@@ -1170,7 +1170,7 @@ namespace TEAMModelOS.Function
                                                     }
                                                 });
                                             }
-                                            //计算TP灯
+                                            //计算TP灯
                                             {
                                                 int T = -1;
                                                 int P = -1;
@@ -1189,7 +1189,7 @@ namespace TEAMModelOS.Function
                                                 }
                                                 //if (lessonRecord.examCount > 0)
                                                 //{
-                                                //    //有评测次数大于0则P是直接绿灯
+                                                //    //有评测次数大于0则P是直接绿灯
                                                 //    P = 2;
                                                 //}
                                                 //else {
@@ -1240,9 +1240,9 @@ namespace TEAMModelOS.Function
                                             //};
                                             //await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS,Constant.Student).UpsertItemAsync<LessonStudentRecord>(lessonStudentRecord, new PartitionKey("LessonStudentRecord"));
                                         }
-                                        //有上传 base.josn.
+                                        //有上传 base.josn.
                                         lessonRecord.upload = 1;
-                                        // await _dingDing.SendBotMsg($"{_option.Location},课堂id:{_lessonId} 更新完成", GroupNames.醍摩豆服務運維群組);
+                                        // await _dingDing.SendBotMsg($"{_option.Location},课堂id:{_lessonId} 更新完成", GroupNames.醍摩豆服務運維群組);
 
                                         LessonService.DoAutoDeleteSchoolLessonRecord(lessonRecord, scope, client, school, tmdid, teacher, _serviceBus, _azureStorage, _configuration, _coreAPIHttpService, _dingDing, _azureRedis);
                                         long? size = await _azureStorage.GetBlobContainerClient(blobname).GetBlobsSize($"records/{_lessonId}");
@@ -1260,7 +1260,7 @@ namespace TEAMModelOS.Function
                                             size = size.HasValue ? size.Value : 0,
                                         };
                                         await client.GetContainer(Constant.TEAMModelOS, tbname).UpsertItemAsync(bloblog);
-                                        //await _dingDing.SendBotMsg($"{_option.Location},课堂id:{_lessonId} blob刷新完成!", GroupNames.醍摩豆服務運維群組);
+                                        //await _dingDing.SendBotMsg($"{_option.Location},课堂id:{_lessonId} blob刷新完成!", GroupNames.醍摩豆服務運維群組);
 
                                         await BlobService.RefreshBlobRoot(new BlobRefreshMessage { progress = "update", root = "records", name = $"{blobname}" }, _serviceBus, _configuration, _azureRedis);
                                         msgs.Add(update);
@@ -1271,29 +1271,29 @@ namespace TEAMModelOS.Function
                                     {
                                         if (!ex.Message.Contains("The specified blob does not exist"))
                                         {
-                                            await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}课程读取base.json,{_lessonId}\n{ex.Message}\n{ex.StackTrace}\n\n{lessonRecord.ToJsonString()}", GroupNames.醍摩豆服務運維群組);
+                                            await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}课程读取base.json,{_lessonId}\n{ex.Message}\n{ex.StackTrace}\n\n{lessonRecord.ToJsonString()}", GroupNames.醍摩豆服務運維群組);
                                         }
 
                                     }
-                                    await BIStats.SetTypeAddStats(client, _dingDing, lessonRecord.school, "Less", 0, 1, lessonRecord.clientInteractionCount);//BI统计增/减量
+                                    await BIStats.SetTypeAddStats(client, _dingDing, lessonRecord.school, "Less", 0, 1, lessonRecord.clientInteractionCount);//BI统计增/减量
                                     break;
-                                //更新 时间线
+                                //更新 时间线
                                 case "up-TimeLine":
                                     //BlobDownloadResult TimeLineblobDownload = await _azureStorage.GetBlobContainerClient(blobname).GetBlobClient($"/{_lessonId}/IES/TimeLine.json").DownloadContentAsync();
                                     //var timeline = TimeLineblobDownload.Content.ToObjectFromJson<List<LessonTimeLine>>();
                                     msgs.Add(update);
                                     break;
-                                //更新 课堂总览信息
+                                //鏇存柊 璇惧爞鎬昏�淇℃伅
                                 case "up-ActivityInfo":
                                     //BlobDownloadResult ActivityInfoblobDownload = await _azureStorage.GetBlobContainerClient(blobname).GetBlobClient($"/{_lessonId}/IES/ActivityInfo.json").DownloadContentAsync();
                                     //var activityInfos = ActivityInfoblobDownload.Content.ToObjectFromJson<List<LessonActivityInfo>>();
                                     msgs.Add(update);
                                     break;
-                                case "up-baseinfo":///更新基础信息,名称科目,年级,分类等,不能删除 ,由update-lesson-baseinfo 触发。
+                                case "up-baseinfo":///更新基础信息,名称科目,年级,分类等,不能删除 ,由update-lesson-baseinfo 触发。
                                     isReplace = true;
                                     msgs.Add(update);
                                     break;
-                                case "up-expire"://消除过期时间,消除后需要取消已经排程的通知订阅
+                                case "up-expire"://娑堥櫎杩囨湡鏃堕棿,娑堥櫎鍚庨渶瑕佸彇娑堝凡缁忔帓绋嬬殑閫氱煡璁㈤槄
                                     try
                                     {
                                         var table = _azureStorage.GetCloudTableClient().GetTableReference("ChangeRecord");
@@ -1354,7 +1354,7 @@ namespace TEAMModelOS.Function
                                     break;
                                 case "create":
                                     oldlessonRecord = null;
-                                    //处理课堂选用的课程信息
+                                    //处理课堂选用的课程信息
 
                                     lessonRecord.show = teacher.lessonShow;
                                     lessonRecord.upload = 0;
@@ -1387,7 +1387,7 @@ namespace TEAMModelOS.Function
                                         }
                                         catch (Exception ex)
                                         {
-                                            await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}-查询课程-CosmosDB异常{ex.Message}\n{ex.StackTrace}\n", GroupNames.醍摩豆服務運維群組);
+                                            await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}-查询课程-CosmosDB异常{ex.Message}\n{ex.StackTrace}\n", GroupNames.醍摩豆服務運維群組);
                                         }
                                         /*catch (CosmosException ex) when (ex.Status != 404)
                                         {
@@ -1407,7 +1407,7 @@ namespace TEAMModelOS.Function
                                         }
                                     }
 
-                                    //处理课堂选用的名单
+                                    //处理课堂选用的名单
                                     if (lessonRecord.groupIds.IsNotEmpty())
                                     {
                                         List<GroupListDto> groups = await GroupListService.GetGroupListByListids(client, _dingDing, lessonRecord.groupIds, lessonRecord.school);
@@ -1438,7 +1438,7 @@ namespace TEAMModelOS.Function
                                                 await SystemService.RecordAccumulateData(_azureRedis, _dingDing, new SDK.Models.Dtos.Accumulate
                                                 { client="hiteach", count=1, id=schoolBase.id, key="lesson-create", name=schoolBase.name, scope="school", target=schoolBase.id });
                                                 await SystemService.RecordAccumulateData(_azureRedis, _dingDing, new SDK.Models.Dtos.Accumulate
-                                                { client="hiteach", count=1, id=lessonRecord.tmdid, key="lesson-create", name="课例", scope="teacher", target=lessonRecord.tmdid });
+                                                { client="hiteach", count=1, id=lessonRecord.tmdid, key="lesson-create", name="璇句緥", scope="teacher", target=lessonRecord.tmdid });
                                             }
                                             var space = await BlobService.GetSurplusSpace(school, scope, $"{Environment.GetEnvironmentVariable("Option:Location")}", _azureCosmos, _azureRedis, _azureStorage, _dingDing, _httpTrigger);
                                             SchoolSetting setting = null;
@@ -1448,7 +1448,7 @@ namespace TEAMModelOS.Function
                                                 setting = JsonDocument.Parse(schoolSetting.Content).RootElement.Deserialize<SchoolSetting>();
                                                 if (setting.lessonSetting != null)
                                                 {
-                                                    //两种状态都不属于,则默认未开启。
+                                                    //两种状态都不属于,则默认未开启。
                                                     if (setting.lessonSetting.openAutoClean != 0 && setting.lessonSetting.openAutoClean != 1)
                                                     {
                                                         setting.lessonSetting.openAutoClean = 0;
@@ -1456,7 +1456,7 @@ namespace TEAMModelOS.Function
                                                     }
                                                     else
                                                     {
-                                                        //属于 要么开启1,要么关闭0
+                                                        //属于 要么开启1,要么关闭0
                                                     }
                                                 }
                                                 else
@@ -1482,24 +1482,24 @@ namespace TEAMModelOS.Function
 
                                             if (!save && school_lesson_expire > 0)
                                             {
-                                                // 1-时间戳,7-时间戳
+                                                // 1-时间戳,7-时间戳
                                                 Dictionary<int, ExpireTag> result = new Dictionary<int, ExpireTag>();
-                                                //暂定7天 
+                                                //暂定7天 
                                                 var now = DateTimeOffset.UtcNow;
-                                                //剩余3天的通知
+                                                //鍓╀綑3澶╃殑閫氱煡
                                                 //var day3= now.AddDays(school_lesson_expire - 3).ToUnixTimeMilliseconds();
                                                 //result.Add(3, day3);
-                                                //剩余1天的通知
+                                                //鍓╀綑1澶╃殑閫氱煡
                                                 var day1 = now.AddDays(school_lesson_expire - (school_lesson_expire - 1)).ToUnixTimeMilliseconds();
                                                 result.Add(1, new ExpireTag { expire = day1, tag = "notification" });
-                                                //到期通知
-                                                //不到五点上传的课例,七天之后直接删除。
+                                                //鍒版湡閫氱煡
+                                                //不到五点上传的课例,七天之后直接删除。
                                                 int addSecond = 0;
                                                 if (now.Hour > 5)
                                                 {
-                                                    // 到凌晨00点还差 (24 - now.Hour) *60 * 60 分钟,再加天数;
+                                                    // 到凌晨00点还差 (24 - now.Hour) *60 * 60 分钟,再加天数;
                                                     addSecond = school_lesson_expire * 86400 + (24 - now.Hour) * 3600 - (now.Hour * 3600);
-                                                    //再加 00到05小时内的 随机秒数
+                                                    //再加 00到05小时内的 随机秒数
                                                     Random rand = new Random();
                                                     int randInt = rand.Next(0, 18000);
                                                     addSecond += randInt;
@@ -1525,8 +1525,8 @@ namespace TEAMModelOS.Function
                                                     foreach (var item in result)
                                                     {
                                                         string PartitionKey = string.Format("{0}{1}{2}", lessonRecord.code, "-", $"expire-{item.Key}");
-                                                        //课堂的id ,
-                                                        //课堂的通知时间类型progress, 默认就会发送一条,到期前一天发送一条,最后已到期发送一条。
+                                                        //璇惧爞鐨刬d ,
+                                                        //课堂的通知时间类型progress, 默认就会发送一条,到期前一天发送一条,最后已到期发送一条。
                                                         var servicebus_message = new ServiceBusMessage(new
                                                         {
                                                             id = lessonRecord.id,
@@ -1556,21 +1556,21 @@ namespace TEAMModelOS.Function
                                                 }
                                             }
                                         }
-                                        //个人课例保存规则
+                                        //涓�汉璇句緥淇濆瓨瑙勫垯
                                         if (scope.Equals("private"))
                                         {
                                             int lessonLimit = teacher.lessonLimit;
                                             var space = await BlobService.GetSurplusSpace(tmdid, scope, $"{Environment.GetEnvironmentVariable("Option:Location")}", _azureCosmos, _azureRedis, _azureStorage, _dingDing, _httpTrigger);
-                                            //20230208调整之前  if (blobTotal * 1073741824 - blobsize > 2147483648)  //剩余空间大于2G 
-                                            //剩余空间不足,则开启自动清理机制
+                                            //20230208璋冩暣涔嬪墠  if (blobTotal * 1073741824 - blobsize > 2147483648)  //鍓╀綑绌洪棿澶т簬2G 
+                                            //剩余空间不足,则开启自动清理机制
                                             if (space.surplus> 0)
                                             {
-                                                //大于0则表示空间充足
+                                                //大于0则表示空间充足
                                                 lessonLimit = -1;
                                             }
                                             else
                                             {
-                                                //20230208调整增加逻辑,之前lessonLimit用于处理默认保存50条,现在用于处理标记是否空间不足,不足则标记清理。
+                                                //20230208调整增加逻辑,之前lessonLimit用于处理默认保存50条,现在用于处理标记是否空间不足,不足则标记清理。
                                                 if ($"{Environment.GetEnvironmentVariable("Option:Location")}".Contains("Test", StringComparison.OrdinalIgnoreCase))
                                                 {
                                                     lessonLimit = 0;
@@ -1582,27 +1582,27 @@ namespace TEAMModelOS.Function
                                             }
                                             if (lessonLimit != -1)
                                             {
-                                                #region 20230208 调整之后
+                                                #region 20230208 璋冩暣涔嬪悗
                                                 {
-                                                    // 1-时间戳,7-时间戳
+                                                    // 1-时间戳,7-时间戳
                                                     Dictionary<int, ExpireTag> result = new Dictionary<int, ExpireTag>();
-                                                    //暂定7天 
+                                                    //暂定7天 
                                                     var now = DateTimeOffset.UtcNow;
-                                                    //剩余3天的通知
+                                                    //鍓╀綑3澶╃殑閫氱煡
                                                     //var day3= now.AddDays(Constant.private_lesson_expire - 3).ToUnixTimeMilliseconds();
                                                     //result.Add(3, day3);
-                                                    //剩余1天的通知
+                                                    //鍓╀綑1澶╃殑閫氱煡
                                                     var day1 = now.AddDays(Constant.private_lesson_expire - (Constant.private_lesson_expire - 1)).ToUnixTimeMilliseconds();
                                                     result.Add(1, new ExpireTag { expire = day1, tag = "notification" });
-                                                    //到期通知
+                                                    //鍒版湡閫氱煡
 
-                                                    //不到五点上传的课例,七天之后直接删除。
+                                                    //不到五点上传的课例,七天之后直接删除。
                                                     int addSecond = 0;
                                                     if (now.Hour > 5)
                                                     {
-                                                        // 到凌晨00点还差 (24 - now.Hour) *60 * 60 分钟,再加天数;
+                                                        // 到凌晨00点还差 (24 - now.Hour) *60 * 60 分钟,再加天数;
                                                         addSecond = Constant.private_lesson_expire * 86400 + (24 - now.Hour) * 3600;
-                                                        //再加 00到05小时内的 随机秒数
+                                                        //再加 00到05小时内的 随机秒数
                                                         Random rand = new Random();
                                                         int randInt = rand.Next(0, 18000);
                                                         addSecond += randInt;
@@ -1611,7 +1611,7 @@ namespace TEAMModelOS.Function
                                                     {
                                                         addSecond = Constant.private_lesson_expire * 24 * 60 * 60;
                                                     }
-                                                    //将当前课例标记为  自动清理
+                                                    //灏嗗綋鍓嶈�渚嬫爣璁颁负  鑷�姩娓呯悊
 
 
                                                     lessonRecord.expire = now.AddSeconds(addSecond).ToUnixTimeMilliseconds();
@@ -1628,8 +1628,8 @@ namespace TEAMModelOS.Function
                                                         foreach (var item in result)
                                                         {
                                                             string PartitionKey = string.Format("{0}{1}{2}", lessonRecord.code, "-", $"expire-{item.Key}");
-                                                            //课堂的id ,
-                                                            //课堂的通知时间类型progress, 默认就会发送一条,到期前一天发送一条,最后已到期发送一条。
+                                                            //璇惧爞鐨刬d ,
+                                                            //课堂的通知时间类型progress, 默认就会发送一条,到期前一天发送一条,最后已到期发送一条。
                                                             var servicebus_message = new ServiceBusMessage(new
                                                             {
                                                                 id = lessonRecord.id,
@@ -1660,12 +1660,12 @@ namespace TEAMModelOS.Function
                                                     await client.GetContainer(Constant.TEAMModelOS, Constant.Teacher).ReplaceItemAsync(lessonRecord, lessonRecord.id, new PartitionKey(lessonRecord.code));
 
                                                 }
-                                                #endregion 20230208 调整之后
+                                                #endregion 20230208 璋冩暣涔嬪悗
 
-                                                #region 20230208 调整之前
-                                                /** 20230208 调整之前
+                                                #region 20230208 璋冩暣涔嬪墠
+                                                /** 20230208 璋冩暣涔嬪墠
                                                 HashSet<string> ids = new HashSet<string>();
-                                                //未定义的 以及过期时间小于等于0 的 课例
+                                                //未定义的 以及过期时间小于等于0 的 课例
                                                 string private_count_sql = $"select value(c.id) from  c where  ( c.expire<=0 or IS_DEFINED(c.expire) = false  ) and c.tmdid='{tmdid}'  ";
                                                 await foreach (var item in client.GetContainer(Constant.TEAMModelOS, Constant.Teacher).GetItemQueryIterator<string>(
                                                     queryText: private_count_sql, requestOptions: new QueryRequestOptions { PartitionKey = new PartitionKey(code) }))
@@ -1674,8 +1674,8 @@ namespace TEAMModelOS.Function
                                                     ids.Add(item);
                                                 }
 
-                                                // 220601  收藏不限條數,但空間不足時,僅保留最後一次上傳的課例   ()
-                                                //包含收藏的本人的个人课例
+                                                // 220601  鏀惰棌涓嶉檺姊濇暩锛屼絾绌洪枔涓嶈冻鏅傦紝鍍呬繚鐣欐渶寰屼竴娆′笂鍌崇殑瑾蹭緥   锛堬級
+                                                //鍖呭惈鏀惰棌鐨勬湰浜虹殑涓�汉璇句緥
                                                 //string favorite_count_sql = $"select value(c.id) from  c where c.type='LessonRecord' and c.owner='{tmdid}'   and c.scope='private' ";
                                                 //await foreach (var item in client.GetContainer(Constant.TEAMModelOS, Constant.Teacher).GetItemQueryIterator<string>(
                                                 //    queryText: favorite_count_sql, requestOptions: new QueryRequestOptions { PartitionKey = new PartitionKey($"Favorite-{tmdid}") }))
@@ -1683,19 +1683,19 @@ namespace TEAMModelOS.Function
                                                 //    ids.Add(item);
                                                 //}
 
-                                                //教师个人预设的,可以通过设置的方式增加
+                                                //教师个人预设的,可以通过设置的方式增加
                                                 int limit = teacher.lessonLimit;
                                                 if (teacher.lessonLimit == 0)
                                                 {
-                                                    //未设置的的采用系统设置的默认值50
+                                                    //未设置的的采用系统设置的默认值50
                                                     limit = Constant.private_lesson_limit;
                                                 }
 
                                                 if (ids.Count >= limit)
                                                 {
                                                     LessonRecord lessonRecordExpire = null;
-                                                    //获取一条最新的 且没有被收藏,且没有被标记为过期的记录,且不是当前触发的id 。
-                                                    //220712 讨论,将desc去掉,获取最旧的那一笔数据。删除最旧的
+                                                    //获取一条最新的 且没有被收藏,且没有被标记为过期的记录,且不是当前触发的id 。
+                                                    //220712 璁ㄨ�锛屽皢desc鍘绘帀锛岃幏鍙栨渶鏃х殑閭d竴绗旀暟鎹�€傚垹闄ゆ渶鏃х殑
                                                     string sql = $"SELECT top 1 value(c)  FROM c  where  ( c.expire<=0 or IS_DEFINED(c.expire) = false  ) and  c.tmdid='{tmdid}' " +
                                                         $"and  c.favorite<=0  and c.id<>'{lessonRecord.id}' and c.status<>404  order by c.startTime   ";
                                                     await foreach (var item in client.GetContainer(Constant.TEAMModelOS, Constant.Teacher).GetItemQueryIterator<LessonRecord>(
@@ -1705,25 +1705,25 @@ namespace TEAMModelOS.Function
                                                     }
                                                     if (lessonRecordExpire != null)
                                                     {
-                                                        // 1-时间戳,7-时间戳
+                                                        // 1-时间戳,7-时间戳
                                                         Dictionary<int, ExpireTag> result = new Dictionary<int, ExpireTag>();
-                                                        //暂定7天 
+                                                        //暂定7天 
                                                         var now = DateTimeOffset.UtcNow;
-                                                        //剩余3天的通知
+                                                        //鍓╀綑3澶╃殑閫氱煡
                                                         //var day3= now.AddDays(Constant.private_lesson_expire - 3).ToUnixTimeMilliseconds();
                                                         //result.Add(3, day3);
-                                                        //剩余1天的通知
+                                                        //鍓╀綑1澶╃殑閫氱煡
                                                         var day1 = now.AddDays(Constant.private_lesson_expire - (Constant.private_lesson_expire - 1)).ToUnixTimeMilliseconds();
                                                         result.Add(1, new ExpireTag { expire = day1, tag = "notification" });
-                                                        //到期通知
+                                                        //鍒版湡閫氱煡
 
-                                                        //不到五点上传的课例,七天之后直接删除。
+                                                        //不到五点上传的课例,七天之后直接删除。
                                                         int addSecond = 0;
                                                         if (now.Hour > 5)
                                                         {
-                                                            // 到凌晨00点还差 (24 - now.Hour) *60 * 60 分钟,再加天数;
+                                                            // 到凌晨00点还差 (24 - now.Hour) *60 * 60 分钟,再加天数;
                                                             addSecond = Constant.private_lesson_expire * 86400 + (24 - now.Hour) * 3600;
-                                                            //再加 00到05小时内的 随机秒数
+                                                            //再加 00到05小时内的 随机秒数
                                                             Random rand = new Random();
                                                             int randInt = rand.Next(0, 18000);
                                                             addSecond += randInt;
@@ -1747,8 +1747,8 @@ namespace TEAMModelOS.Function
                                                             foreach (var item in result)
                                                             {
                                                                 string PartitionKey = string.Format("{0}{1}{2}", lessonRecordExpire.code, "-", $"expire-{item.Key}");
-                                                                //课堂的id ,
-                                                                //课堂的通知时间类型progress, 默认就会发送一条,到期前一天发送一条,最后已到期发送一条。
+                                                                //璇惧爞鐨刬d ,
+                                                                //课堂的通知时间类型progress, 默认就会发送一条,到期前一天发送一条,最后已到期发送一条。
                                                                 var message = new ServiceBusMessage(new
                                                                 {
                                                                     id = lessonRecordExpire.id,
@@ -1780,34 +1780,34 @@ namespace TEAMModelOS.Function
                                                     }
 
                                                 }**/
-                                                #endregion 20230208 调整之前
+                                                #endregion 20230208 璋冩暣涔嬪墠
                                             }
                                             else
                                             {
-                                                //=-1 则表示不限制上传数量
+                                                //=-1 鍒欒〃绀轰笉闄愬埗涓婁紶鏁伴噺
                                             }
                                             await SystemService.RecordAccumulateData(_azureRedis, _dingDing, new SDK.Models.Dtos.Accumulate
-                                            { client="hiteach", count=1, id=lessonRecord.tmdid, key="lesson-create", name="课例", scope="teacher", target=lessonRecord.tmdid });
+                                            { client="hiteach", count=1, id=lessonRecord.tmdid, key="lesson-create", name="璇句緥", scope="teacher", target=lessonRecord.tmdid });
                                         }
                                     }
                                     catch (Exception e)
                                     {
-                                        await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}-处理课堂记录的-CosmosDB异常{e.Message}\n{e.StackTrace}\n\n{lessonRecord.ToJsonString()}", GroupNames.醍摩豆服務運維群組);
+                                        await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}-处理课堂记录的-CosmosDB异常{e.Message}\n{e.StackTrace}\n\n{lessonRecord.ToJsonString()}", GroupNames.醍摩豆服務運維群組);
                                     }
 
                                     msgs.Add(update);
-                                    await BIStats.SetTypeAddStats(client, _dingDing, lessonRecord.school, "Less", 1, 0);//BI统计增/减量
+                                    await BIStats.SetTypeAddStats(client, _dingDing, lessonRecord.school, "Less", 1, 0);//BI统计增/减量
                                     break;
                                 default:
                                     break;
                             }
                         }
-                        //如果被删除则不能再被更新
+                        //濡傛灉琚�垹闄ゅ垯涓嶈兘鍐嶈�鏇存柊
                         if (isReplace)
                         {
                             await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, tbname).ReplaceItemAsync<LessonRecord>(lessonRecord, lessonId, new PartitionKey(code));
                         }
-                        //计算课堂更新前后的差值
+                        //计算课堂更新前后的差值
                         lessonDis = LessonService.DisLessonCount(oldlessonRecord, lessonRecord, lessonDis);
                         await LessonService.FixLessonCount(client, _dingDing, lessonRecord, oldlessonRecord, lessonDis);
                     }
@@ -1816,11 +1816,11 @@ namespace TEAMModelOS.Function
             }
             catch (CosmosException e)
             {
-                await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}-更新课堂记录出错-CosmosDB异常{e.Message}\n{e.StackTrace}\n", GroupNames.醍摩豆服務運維群組);
+                await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}-更新课堂记录出错-CosmosDB异常{e.Message}\n{e.StackTrace}\n", GroupNames.醍摩豆服務運維群組);
             }
             catch (Exception ex)
             {
-                await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}-更新课堂记录出错\n{ex.Message}\n{ex.StackTrace}\n\n{data}\n{code}\n{updates}\n", GroupNames.醍摩豆服務運維群組);
+                await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}-更新课堂记录出错\n{ex.Message}\n{ex.StackTrace}\n\n{data}\n{code}\n{updates}\n", GroupNames.醍摩豆服務運維群組);
             }
             finally
             {
@@ -1861,7 +1861,7 @@ namespace TEAMModelOS.Function
                 jsonMsg.TryGetProperty("school", out JsonElement _school);
                 jsonMsg.TryGetProperty("tag", out JsonElement _tag);
                 var client = _azureCosmos.GetCosmosClient();
-                //处理到期删除
+                //澶勭悊鍒版湡鍒犻櫎
                 if (_tag.ValueKind.Equals(JsonValueKind.String) && $"{_tag}".Equals("delete"))
                 {
                     string lessonId = $"{id}";
@@ -1894,8 +1894,8 @@ namespace TEAMModelOS.Function
                         var messageChange = new ServiceBusMessage(new { delete_id = lessonId, tmdid = tmdid, scope = scope, opt = "delete", school = school }.ToJsonString());
                         messageChange.ApplicationProperties.Add("name", "LessonRecordEvent");
                         await _serviceBus.GetServiceBusClient().SendMessageAsync(ActiveTask, messageChange);
-                        await _dingDing.SendBotMsg($"课例:【{lessonRecord.name}】\n课例ID:【{lessonRecord.id}】\n因时间到期,即将被自动删除,到期时间:" +
-                        $"{lessonRecord.expire}\n{lessonRecord.ToJsonString()}", GroupNames.成都开发測試群組);
+                        await _dingDing.SendBotMsg($"课例:【{lessonRecord.name}】\n课例ID:【{lessonRecord.id}】\n因时间到期,即将被自动删除,到期时间:" +
+                        $"{lessonRecord.expire}\n{lessonRecord.ToJsonString()}", GroupNames.成都开发測試群組);
                     }
                 }
                 string biz = "expire";
@@ -1906,7 +1906,7 @@ namespace TEAMModelOS.Function
             }
             catch (Exception ex)
             {
-                await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}-ServiceBus,LessonRecordExpire()\n{ex.Message}\n{ex.StackTrace}\n\n{jsonMsg.ToJsonString()}", GroupNames.醍摩豆服務運維群組);
+                await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}-ServiceBus,LessonRecordExpire()\n{ex.Message}\n{ex.StackTrace}\n\n{jsonMsg.ToJsonString()}", GroupNames.醍摩豆服務運維群組);
             }
             finally
             {  
@@ -1934,7 +1934,7 @@ namespace TEAMModelOS.Function
             var json = JsonDocument.Parse(message.Body);
             try
             {
-                //await _dingDing.SendBotMsg($"IES5,{Environment.GetEnvironmentVariable("Option:Location")},Imei AF call\n{msg.ToJsonString()}", GroupNames.成都开发測試群組);
+                //await _dingDing.SendBotMsg($"IES5,{Environment.GetEnvironmentVariable("Option:Location")},Imei AF call\n{msg.ToJsonString()}", GroupNames.成都开发測試群組);
                 
                 if (json.RootElement.TryGetProperty("channel", out JsonElement channel) &&
                 json.RootElement.TryGetProperty("userid", out JsonElement userid) &&
@@ -1979,7 +1979,7 @@ namespace TEAMModelOS.Function
             }
             catch (Exception ex)
             {
-                await _dingDing.SendBotMsg($"IES5,{_option.Location},Imei AF error\n{ex.Message}\n{ex.StackTrace}{json.RootElement.ToJsonString()}", GroupNames.醍摩豆服務運維群組);
+                await _dingDing.SendBotMsg($"IES5,{_option.Location},Imei AF error\n{ex.Message}\n{ex.StackTrace}{json.RootElement.ToJsonString()}", GroupNames.醍摩豆服務運維群組);
             }
             finally
             {  
@@ -2058,9 +2058,9 @@ namespace TEAMModelOS.Function
             long timeout = 60 * 5;
             if (dis > timeout)
             {
-                await _dingDing.SendBotMsg($"ServiceBus,RefreshBlob:空间计算已经超过{timeout}秒\n容器名:{name}\n文件夹:{u}\n计算时长:{dis}\n文件夹大小:{blobsize}", GroupNames.醍摩豆服務運維群組);
+                await _dingDing.SendBotMsg($"ServiceBus,RefreshBlob:空间计算已经超过{timeout}秒\n容器名:{name}\n文件夹:{u}\n计算时长:{dis}\n文件夹大小:{blobsize}", GroupNames.醍摩豆服務運維群組);
             }
-            //await _dingDing.SendBotMsg($"ServiceBus,RefreshBlob:\n容器名:{name}\n文件夹:{u}\n计算时长:{dis}\n文件夹大小:{blobsize}", GroupNames.醍摩豆服務運維群組);
+            //await _dingDing.SendBotMsg($"ServiceBus,RefreshBlob:\n容器名:{name}\n文件夹:{u}\n计算时长:{dis}\n文件夹大小:{blobsize}", GroupNames.醍摩豆服務運維群組);
         }
 
     }

+ 8 - 8
TEAMModelOS.Function/IESTimerTrigger.cs

@@ -1,4 +1,4 @@
-using System;
+锘縰sing System;
 using DinkToPdf.Contracts;
 using Microsoft.Azure.Functions.Worker;
 using Microsoft.Extensions.Configuration;
@@ -13,8 +13,8 @@ namespace TEAMModelOS.Function
     {
         private readonly ILogger _logger;
         /// <summary>
-        /// 文档。https://docs.microsoft.com/zh-cn/azure/azure-functions/functions-bindings-timer?tabs=in-process&pivots=programming-language-csharp
-        /// Timer 在线测试  https://ncrontab.swimburger.net/
+        /// 鏂囨。銆俬ttps://docs.microsoft.com/zh-cn/azure/azure-functions/functions-bindings-timer?tabs=in-process&pivots=programming-language-csharp
+        /// Timer 鍦ㄧ嚎娴嬭瘯  https://ncrontab.swimburger.net/
         /// </summary>
         private readonly AzureCosmosFactory _azureCosmos;
         private readonly DingDing _dingDing;
@@ -44,8 +44,8 @@ namespace TEAMModelOS.Function
 
 
         /// <summary>
-        /// //0 1 * * * * 一天中每小时的第 1 分钟
-        ///0 */10 * * * *  每五分钟一次
+        /// //0 1 * * * * 一天中每小时的第 1 分钟
+        ///0 */10 * * * *  每五分钟一次
         /// </summary>
         /// <param name="myTimer"></param>
         /// <returns></returns>
@@ -55,7 +55,7 @@ namespace TEAMModelOS.Function
             _logger.LogInformation($"C# Timer trigger function executed at: {DateTime.Now}");
             try
             {
-                await _dingDing.SendBotMsg($"{_coreAPIHttpService.options.location},定时任务{DateTimeOffset.Now.ToString("yyyy-MM-dd HH:mm:ss")}", GroupNames.成都开发測試群組);
+                await _dingDing.SendBotMsg($"{_coreAPIHttpService.options.location},定时任务{DateTimeOffset.Now.ToString("yyyy-MM-dd HH:mm:ss")}", GroupNames.成都开发測試群組);
                 string local = Environment.GetEnvironmentVariable("Option:Location");
                 // if (local.Contains("Test")||local.Contains("Dep"))
                 {
@@ -88,12 +88,12 @@ namespace TEAMModelOS.Function
                         client.DefaultRequestHeaders.Add("Authorization", $"Bearer {token.AccessToken}");
                     }
                     var data = await TEAMModelOS.SDK.Models.Service.SystemService.AccumulateDaily(_configuration, _azureRedis, _azureCosmos, _coreAPIHttpService, _dingDing, client, _snowflakeId, url, am, pm);
-                    //await _dingDing.SendBotMsg($"返回数据{data.ToJsonString()}", GroupNames.成都开发測試群組);
+                    //await _dingDing.SendBotMsg($"返回数据{data.ToJsonString()}", GroupNames.成都开发測試群組);
                 }
             }
             catch (Exception ex)
             {
-                await _dingDing.SendBotMsg($"{DailyReport}\n{ex.Message}\n{ex.StackTrace}", GroupNames.成都开发測試群組);
+                await _dingDing.SendBotMsg($"{DailyReport}\n{ex.Message}\n{ex.StackTrace}", GroupNames.成都开发測試群組);
             }
 
             if (myTimer.ScheduleStatus is not null)