Преглед на файлове

处理在线人数异常

Li преди 3 години
родител
ревизия
96d4aacb3d
променени са 1 файла, в които са добавени 3 реда и са изтрити 3 реда
  1. 3 3
      TEAMModelBI/Controllers/BIHome/OnLineController.cs

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

@@ -91,9 +91,9 @@ namespace TEAMModelBI.Controllers.BIHome
             todayTchCnt = await CommonFind.GetSqlValueCount(cosmosClient, "Teacher", addSql, "Base");
             todayStuCnt = await CommonFind.GetSqlValueCount(cosmosClient, "Student", addSql, "Base");
 
-            string onStuSql = $"select value(count(c.id)) from c join t in c.loginInfos where array_length(c.loginInfos) > 0 and t.expire > {hour1}";
-            onTchCnt = await CommonFind.GetSqlValueCount(cosmosClient, "Teacher", onStuSql, "Base");
-            onStuCnt = await CommonFind.GetSqlValueCount(cosmosClient, "Student", onStuSql, "Base");
+            string onStuSql = $"select value(count(c.id)) from c join t in c.loginInfos where array_length(c.loginInfos) > 0 and t.expire > {hour1} and c.pk='Base'";
+            onTchCnt = await CommonFind.GetSqlValueCount(cosmosClient, "Teacher", onStuSql);
+            onStuCnt = await CommonFind.GetSqlValueCount(cosmosClient, "Student", onStuSql);
 
             //接口访问量
             List<RecCnt> recCnts = new();