浏览代码

統測活動 教師課程別 追加Email欄位

jeff 10 月之前
父节点
当前提交
3d0a9b155e

+ 3 - 0
TEAMModelOS.Function/IESServiceBusTrigger.cs

@@ -2207,10 +2207,13 @@ namespace TEAMModelOS.Function
                                     };
                                     await table.Save<ChangeRecord>(changeRecord);
                                 }
+                                //寄發Email
+                                ///取得收信者Email ※ jointCourse.creatorEmail
                                 break;
                             case "finish":
                                 string pk = string.Format("{0}{1}{2}{3}{4}{5}{6}", "JointEvent", "-", $"{jointEventId}", "-", "schedule", "-", "going");
                                 await table.DeleteSingle<ChangeRecord>(pk, jointEventSchedule.id);
+                                //寄發Email
                                 break;
                         }
                     }

+ 1 - 0
TEAMModelOS.SDK/Models/Cosmos/Teacher/JointEvent.cs

@@ -60,6 +60,7 @@ namespace TEAMModelOS.SDK.Models
         public string scope { get; set; } //school:學校(選課班) private:個人 
         public string creatorId { get; set; }
         public string creatorName { get; set; }
+        public string creatorEmail { get; set; }
         public string schoolId { get; set; } //老師個人課程時為null
         public string periodId { get; set; } //老師個人課程時為null
         public List<JointEventGroupCourse> courseLists { get; set; } = new();

+ 2 - 0
TEAMModelOS/Controllers/Teacher/JointEventController.cs

@@ -567,6 +567,7 @@ namespace TEAMModelOS.Controllers.Common
                 string jointGroupId = (request.TryGetProperty("jointGroupId", out JsonElement _jointGroupId)) ? _jointGroupId.ToString() : string.Empty;
                 string creatorId = (request.TryGetProperty("creatorId", out JsonElement _creatorId)) ? _creatorId.ToString() : string.Empty;
                 string creatorName = (request.TryGetProperty("creatorName", out JsonElement _creatorName)) ? _creatorName.ToString() : string.Empty;
+                string creatorEmail = (request.TryGetProperty("creatorEmail", out JsonElement _creatorEmail)) ? _creatorEmail.ToString() : string.Empty;
                 string scope = (request.TryGetProperty("scope", out JsonElement _scope)) ? _scope.ToString() : string.Empty;
                 List<JointEventGroupBase.JointEventGroupCourse> courseLists = (request.TryGetProperty("courseLists", out JsonElement _courseLists)) ? _courseLists.ToObject<List<JointEventGroupBase.JointEventGroupCourse>>() : null;
                 if (string.IsNullOrWhiteSpace(jointEventId) || string.IsNullOrWhiteSpace(jointGroupId) || string.IsNullOrWhiteSpace(creatorId) || courseLists == null || string.IsNullOrWhiteSpace(scope))
@@ -606,6 +607,7 @@ namespace TEAMModelOS.Controllers.Common
                         jointCourse.jointGroupId = jointGroupId;
                         jointCourse.creatorId = creatorId;
                         jointCourse.creatorName = creatorName;
+                        jointCourse.creatorEmail = creatorEmail;
                     }
                     //修改
                     jointCourse.courseLists = courseLists;