Ver código fonte

修改返回字段

Li 3 anos atrás
pai
commit
4a4c24c628
1 arquivos alterados com 3 adições e 3 exclusões
  1. 3 3
      TEAMModelBI/Controllers/BIHome/OnLineController.cs

+ 3 - 3
TEAMModelBI/Controllers/BIHome/OnLineController.cs

@@ -237,7 +237,7 @@ namespace TEAMModelBI.Controllers.BIHome
 
             Dictionary<int, int> scLessCnt = new();  //学校课例
             Dictionary<int, int> tchLessCnt = new();   //教师课例
-            Dictionary<int, int> yasterdayCnt = new();  //昨天24小时课例
+            Dictionary<int, int> yesterdayCnt = new();  //昨天24小时课例
 
             for (int i = 0; i < 24; i++)
             {
@@ -260,10 +260,10 @@ namespace TEAMModelBI.Controllers.BIHome
                 var (yHourS, yHourE) = TimeHelper.GetStartOrEnd(yesterday, type: "hour");
                 string sql = $"select value(count(c.id)) from c where c.pk='LessonRecord' and c.startTime >= {yHourS} and c.startTime <= {yHourE}";
                 int hourLessCnt = await CommonFind.GetSqlValueCount(cosmosClient, new List<string> { "School", "Teacher" }, sql);
-                yasterdayCnt.Add(i, hourLessCnt);
+                yesterdayCnt.Add(i, hourLessCnt);
             }
 
-            return Ok(new { state = 200, scLessCnt = scLessCnt.ToList(), tchLessCnt = tchLessCnt.ToList(), yasterdayCnt = yasterdayCnt.ToList() });
+            return Ok(new { state = 200, scLessCnt = scLessCnt.ToList(), tchLessCnt = tchLessCnt.ToList(), yesterdayCnt = yesterdayCnt.ToList() });
         }
 
         /// <summary>