|
@@ -822,6 +822,12 @@ namespace TEAMModelBI.Controllers.BISchool
|
|
|
schoolTeacher.roles.Add("admin");
|
|
|
schoolTeacher.status = "join";
|
|
|
schoolTeacher = await cosmosClient.GetContainer("TEAMModelOS", "School").ReplaceItemAsync<SchoolTeacher>(schoolTeacher, schoolTeacher.id, new PartitionKey($"Teacher-{schoolId}"));
|
|
|
+
|
|
|
+ #region 同時更新teacher的school.status
|
|
|
+ var school = teacher.schools.Find(f => f.schoolId.Equals($"{schoolId}"));
|
|
|
+ school.status = "join";
|
|
|
+ await cosmosClient.GetContainer("TEAMModelOS", "Teacher").ReplaceItemAsync<Teacher>(teacher, teacher.id, new PartitionKey("Base"));
|
|
|
+ #endregion
|
|
|
strMsg.Append($"并设置管理员,学校信息{schoolName}【{schoolId}】");
|
|
|
}
|
|
|
else
|