|
@@ -922,8 +922,6 @@ namespace TEAMModelFunction
|
|
|
msgs.Add(update);
|
|
|
break;
|
|
|
case "delete":
|
|
|
- //BlobDownloadResult ActivityInfoblobDownload = await _azureStorage.GetBlobContainerClient(blobname).GetBlobClient($"/{_lessonId}/IES/ActivityInfo.json").DownloadContentAsync();
|
|
|
- //var activityInfos = ActivityInfoblobDownload.Content.ToObjectFromJson<List<LessonActivityInfo>>();
|
|
|
try
|
|
|
{
|
|
|
await client.GetContainer(Constant.TEAMModelOS, tbname).DeleteItemAsync<LessonRecord>(lessonId, new PartitionKey(code));
|
|
@@ -932,6 +930,7 @@ namespace TEAMModelFunction
|
|
|
catch (CosmosException ex) {
|
|
|
msgs.Add(update);
|
|
|
}
|
|
|
+ lessonRecord = null;
|
|
|
break;
|
|
|
case "create":
|
|
|
oldlessonRecord = null;
|
|
@@ -999,10 +998,11 @@ namespace TEAMModelFunction
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
+ //
|
|
|
+ await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, tbname).ReplaceItemAsync<LessonRecord>(lessonRecord, lessonId, new PartitionKey(code));
|
|
|
//计算课堂更新前后的差值
|
|
|
lessonDis = LessonService.DisLessonCount(oldlessonRecord, lessonRecord, lessonDis);
|
|
|
await LessonService.FixLessonCount(client, _dingDing, lessonRecord, lessonDis);
|
|
|
- await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, tbname).ReplaceItemAsync<LessonRecord>(lessonRecord, lessonId, new PartitionKey(code));
|
|
|
}
|
|
|
}
|
|
|
catch (Exception ex)
|