|
@@ -1597,22 +1597,22 @@ namespace TEAMModelOS.FunctionV4.ServiceBus
|
|
lessonRecord.upload = 0;
|
|
lessonRecord.upload = 0;
|
|
if (!string.IsNullOrEmpty(lessonRecord.courseId))
|
|
if (!string.IsNullOrEmpty(lessonRecord.courseId))
|
|
{
|
|
{
|
|
- Course course = null;
|
|
|
|
|
|
+ CourseBase course = null;
|
|
try
|
|
try
|
|
{
|
|
{
|
|
- var cresponse = await client.GetContainer(Constant.TEAMModelOS, "School").ReadItemStreamAsync(lessonRecord.courseId, new PartitionKey($"Course-{lessonRecord.school}"));
|
|
|
|
|
|
+ var cresponse = await client.GetContainer(Constant.TEAMModelOS, "School").ReadItemStreamAsync(lessonRecord.courseId, new PartitionKey($"CourseBase-{lessonRecord.school}"));
|
|
if (cresponse.Status == 200)
|
|
if (cresponse.Status == 200)
|
|
{
|
|
{
|
|
using var cJson = await JsonDocument.ParseAsync(cresponse.ContentStream);
|
|
using var cJson = await JsonDocument.ParseAsync(cresponse.ContentStream);
|
|
- course = cJson.ToObject<Course>();
|
|
|
|
|
|
+ course = cJson.ToObject<CourseBase>();
|
|
}
|
|
}
|
|
else
|
|
else
|
|
{
|
|
{
|
|
- var sresponse = await client.GetContainer(Constant.TEAMModelOS, "Teacher").ReadItemStreamAsync(lessonRecord.courseId, new PartitionKey($"Course-{lessonRecord.tmdid}"));
|
|
|
|
|
|
+ var sresponse = await client.GetContainer(Constant.TEAMModelOS, "Teacher").ReadItemStreamAsync(lessonRecord.courseId, new PartitionKey($"CourseBase"));
|
|
if (sresponse.Status == 200)
|
|
if (sresponse.Status == 200)
|
|
{
|
|
{
|
|
using var cJson = await JsonDocument.ParseAsync(sresponse.ContentStream);
|
|
using var cJson = await JsonDocument.ParseAsync(sresponse.ContentStream);
|
|
- course = cJson.ToObject<Course>();
|
|
|
|
|
|
+ course = cJson.ToObject<CourseBase>();
|
|
}
|
|
}
|
|
else
|
|
else
|
|
{
|
|
{
|