|
@@ -201,7 +201,8 @@ namespace TEAMModelBI.Controllers.BISchool
|
|
|
areaId = string.IsNullOrEmpty(bischool.areaId) ? "" : bischool.areaId,
|
|
|
schoolCode = createSchoolInfo.id,
|
|
|
period = PresetSchoolPeriod(bischool.period, foundSchools.lang, campusId),
|
|
|
- scale = bischool.size >= 300 ? 500 : 0
|
|
|
+ scale = bischool.size >= 300 ? 500 : 0,
|
|
|
+ createTime = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds()
|
|
|
};
|
|
|
|
|
|
stringBuilder.Append($"创建学校:{upSchool.name}【{upSchool.id}】");
|
|
@@ -230,11 +231,10 @@ namespace TEAMModelBI.Controllers.BISchool
|
|
|
name = teacher.name,
|
|
|
picture = teacher.picture,
|
|
|
status = "join",
|
|
|
- createTime = DateTimeOffset.UtcNow.ToUnixTimeSeconds(),
|
|
|
+ createTime = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(),
|
|
|
pk = "Teacher",
|
|
|
ttl = -1
|
|
|
};
|
|
|
-
|
|
|
stringBuilder.Append($"教师信息:{schoolTeacher.name}【{schoolTeacher.id}】,教师权限:{string.Join(",", schoolTeacher.roles)}");
|
|
|
await cosmosClient.GetContainer(Constant.TEAMModelOS, "Teacher").ReplaceItemAsync<Teacher>(teacher, teacher.id, new PartitionKey(teacher.code));
|
|
|
await cosmosClient.GetContainer(Constant.TEAMModelOS, "School").CreateItemAsync<SchoolTeacher>(schoolTeacher, new PartitionKey(schoolTeacher.code));
|
|
@@ -252,6 +252,7 @@ namespace TEAMModelBI.Controllers.BISchool
|
|
|
//创建账号并第一次登录IES5则默认赠送1G
|
|
|
size = 1,
|
|
|
defaultSchool = createSchoolInfo.id,
|
|
|
+ createTime = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(),
|
|
|
schools = new List<Teacher.TeacherSchool>() { new Teacher.TeacherSchool { schoolId = createSchoolInfo.id, name = bischool.name, status = "join", time = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds() } }
|
|
|
};
|
|
|
|
|
@@ -266,7 +267,7 @@ namespace TEAMModelBI.Controllers.BISchool
|
|
|
name = $"{tmdId}-管理员",
|
|
|
picture = "",
|
|
|
status = "join",
|
|
|
- createTime = DateTimeOffset.UtcNow.ToUnixTimeSeconds(),
|
|
|
+ createTime = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(),
|
|
|
pk = "Teacher",
|
|
|
ttl = -1
|
|
|
};
|
|
@@ -672,7 +673,7 @@ namespace TEAMModelBI.Controllers.BISchool
|
|
|
name = tempTeacher.name,
|
|
|
job = $"{tempShool.name}-顾问",
|
|
|
size = 0,
|
|
|
- createTime = DateTimeOffset.UtcNow.ToUnixTimeSeconds()
|
|
|
+ createTime = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds()
|
|
|
};
|
|
|
//添加学校顾问
|
|
|
await cosmosClient.GetContainer(Constant.TEAMModelOS, "School").CreateItemAsync<SchoolTeacher>(addSchoolTeacher, new PartitionKey($"Teacher-{tempShool.id}"));
|
|
@@ -685,7 +686,7 @@ namespace TEAMModelBI.Controllers.BISchool
|
|
|
schoolId = tempShool.id,
|
|
|
name = tempShool.name,
|
|
|
status = "join",
|
|
|
- time = DateTimeOffset.UtcNow.ToUnixTimeSeconds(),
|
|
|
+ time = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(),
|
|
|
picture = tempShool.picture,
|
|
|
areaId = tempShool.areaId
|
|
|
};
|
|
@@ -704,7 +705,7 @@ namespace TEAMModelBI.Controllers.BISchool
|
|
|
name = tempTeacher.name,
|
|
|
job = $"{tempShool.name}-顾问",
|
|
|
size = 0,
|
|
|
- createTime = DateTimeOffset.UtcNow.ToUnixTimeSeconds()
|
|
|
+ createTime = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds()
|
|
|
};
|
|
|
//添加学校学校顾问
|
|
|
await cosmosClient.GetContainer(Constant.TEAMModelOS, "School").CreateItemAsync<SchoolTeacher>(addSchoolTeacher, new PartitionKey($"Teacher-{tempShool.id}"));
|