浏览代码

处理课列累加的问题

zhouj1203@hotmail.com 3 年之前
父节点
当前提交
a23b2ce9a2
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      TEAMModelOS.SDK/Models/Service/LessonService.cs

+ 3 - 3
TEAMModelOS.SDK/Models/Service/LessonService.cs

@@ -176,13 +176,13 @@ namespace TEAMModelOS.SDK.Models.Service
                 var response = await client.GetContainer(Constant.TEAMModelOS, tbname).ReadItemStreamAsync(data.tmdid.ToString(), new PartitionKey(code));
                 if (response.Status == 200)
                 {
-                   /* using var json = await JsonDocument.ParseAsync(response.ContentStream);
+                    using var json = await JsonDocument.ParseAsync(response.ContentStream);
                     LessonCount count = json.ToObject<LessonCount>();
 
                     count.tCount[day - 1] += lessonDis.disTCount;
                     count.pCount[day - 1] += lessonDis.disPCount;
                     count.ptCount[day - 1] += lessonDis.disDCount;
-                    count.beginCount[day - 1] += lessonDis.record;*/
+                    count.beginCount[day - 1] += lessonDis.record;
                     /*if (!count.courseIds.Contains(data.courseId))
                     {
                         count.courseIds.Add(data.courseId);
@@ -190,7 +190,7 @@ namespace TEAMModelOS.SDK.Models.Service
                     }*/
 
 
-                    //await client.GetContainer("TEAMModelOS", tbname).ReplaceItemAsync(count, count.id, new PartitionKey(code));
+                    await client.GetContainer("TEAMModelOS", tbname).ReplaceItemAsync(count, count.id, new PartitionKey(code));
                 }
                 else
                 {