浏览代码

研修删除

zhouj1203@hotmail.com 3 年之前
父节点
当前提交
fd8bf0dca2
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      TEAMModelOS/Controllers/Common/StudyController.cs

+ 2 - 2
TEAMModelOS/Controllers/Common/StudyController.cs

@@ -328,8 +328,7 @@ namespace TEAMModelOS.Controllers.Common
                     }
                     if (flag) {
                         study.ttl = 1;
-                        study.status = 404;
-                        study = await client.GetContainer(Constant.TEAMModelOS, "Common").ReplaceItemAsync(study, study.id, new PartitionKey($"{study.code}"));
+                        study.status = 404;                        
                         if (!string.IsNullOrEmpty(study.examId))
                         {
                             ExamLite lite =  await client.GetContainer("TEAMModelOS", "Common").ReadItemAsync<ExamLite>(study.examId, new PartitionKey($"ExamLite-{code}"));
@@ -353,6 +352,7 @@ namespace TEAMModelOS.Controllers.Common
                             await client.GetContainer("TEAMModelOS", "Common").ReplaceItemAsync(homework, homework.id, new PartitionKey($"Homework-{code}"));
                             //await client.GetContainer("TEAMModelOS", "Common").DeleteItemStreamAsync(study.workId, new PartitionKey($"Homework-{code}"));
                         }
+                        study = await client.GetContainer(Constant.TEAMModelOS, "Common").ReplaceItemAsync(study, study.id, new PartitionKey($"{study.code}"));
                     }
                     
                 }