Bladeren bron

Merge branch 'develop' of http://52.130.252.100:10000/TEAMMODEL/TEAMModelOS into develop

XW 10 maanden geleden
bovenliggende
commit
cd0cab36db

+ 1 - 1
TEAMModelOS.Function/IESTimerTrigger.cs

@@ -61,7 +61,7 @@ namespace TEAMModelOS.Function
                 {
 
                     int am = 8;
-                    int pm = 11;
+                    int pm = 20;
                     //int am = DateTimeOffset.Now.Hour;
                     //int pm = DateTimeOffset.Now.Hour;
                     var url = Environment.GetEnvironmentVariable("HaBookAuth:CoreAPI");

+ 8 - 2
TEAMModelOS.SDK/Models/Service/SystemService.cs

@@ -232,7 +232,7 @@ Hello {tmdname}, here is the summary report of the homework tasks you have poste
                     string key = score.Element.ToString();
                     //homework_going.Add(key, val);
                     homework_submit_today.TryAdd(key, val);
-
+                    keys.Add(key);
                 }
             }
 
@@ -329,6 +329,10 @@ Hello {tmdname}, here is the summary report of the homework tasks you have poste
                 //{
                 //    continue;
                 //}
+                //if (!(teacher.id.Equals("1535418750")))
+                //{
+                //    continue;
+                //}
                 StringBuilder notify = new StringBuilder();
 #if DEBUG
                 int sendTime_pm = now.Hour;
@@ -410,7 +414,7 @@ Hello {tmdname}, here is the summary report of the homework tasks you have poste
                     }
 
                 }
-                await dingDing.SendBotMsg($"{teacher.name},{homework_submit_today.ToJsonString()},pm:{pm},am:{am},tztH:{tzt.Hour},sendPm:{sendTime_pm},sendAm:{sendTime_am}", GroupNames.成都开发測試群組);
+               
                 foreach (var homeworksm in homework_submit) 
                 {
                  
@@ -548,6 +552,8 @@ Hello {tmdname}, here is the summary report of the homework tasks you have poste
                         }
                     }
                 }
+
+               // await dingDing.SendBotMsg($"{teacher.name},{homework_submit_today.ToJsonString()},pm:{pm},am:{am},tztH:{tzt.Hour},sendPm:{sendTime_pm},sendAm:{sendTime_am},examCount:{examCount},lessonCount:{lessonCount},homeworkCount:{homeworkCount}", GroupNames.成都开发測試群組);
                 if (tzt.Hour==sendTime_pm  && (examCount>0 || lessonCount>0 || homeworkCount>0  || (grouplist.Count>0 && !string.IsNullOrWhiteSpace(grouplistSB.ToString())))) 
                 {
                     string template=string.Empty;

+ 3 - 12
TEAMModelOS/Controllers/Teacher/JointEventController.cs

@@ -404,10 +404,7 @@ namespace TEAMModelOS.Controllers.Common
         /// 取得統測教師課程及組別
         /// </summary>
         [ProducesDefaultResponseType]
-        [Authorize(Roles = "IES")]
-#if !DEBUG
-        [AuthToken(Roles = "teacher")]
-#endif
+        [Authorize(Roles = "IES,HTCommunity")]
         [HttpPost("course/find")]
         public async Task<IActionResult> JointCourseFind(JsonElement request)
         {
@@ -452,10 +449,7 @@ namespace TEAMModelOS.Controllers.Common
         /// 新建修改教師課程及組別
         /// </summary>
         [ProducesDefaultResponseType]
-        [Authorize(Roles = "IES")]
-#if !DEBUG
-        [AuthToken(Roles = "teacher")]
-#endif
+        [Authorize(Roles = "IES,HTCommunity")]
         [HttpPost("course/upsert")]
         public async Task<IActionResult> JointCourseUpsert(JsonElement request)
         {
@@ -567,10 +561,7 @@ namespace TEAMModelOS.Controllers.Common
         /// <param name="request"></param>
         /// <returns></returns>
         [ProducesDefaultResponseType]
-        [Authorize(Roles = "IES")]
-#if !DEBUG
-        [AuthToken(Roles = "teacher")]
-#endif
+        [Authorize(Roles = "IES,HTCommunity")]
         [HttpPost("exam/find")]
         public async Task<IActionResult> ExamFind(JsonElement request)
         {

+ 1 - 0
TEAMModelOS/Controllers/Third/Moofen/MoofenController.cs

@@ -359,6 +359,7 @@ namespace TEAMModelOS.Controllers.Third.Moofen
                 }
                 else
                 {
+                    await _dingDing.SendBotMsg($"多分题目异常{response.StatusCode}\n{content}", GroupNames.成都开发測試群組);
                     content = await response.Content.ReadAsStringAsync();
                     return Ok(new { code = response.StatusCode, data = content }) ;
                 }

File diff suppressed because it is too large
+ 28 - 28
TEAMModelOS/appsettings.Development.json