Forráskód Böngészése

调整作业查询方式

zhouj1203@hotmail.com 2 éve
szülő
commit
74c1dbcd37
1 módosított fájl, 5 hozzáadás és 2 törlés
  1. 5 2
      TEAMModelOS/Controllers/Common/HomeworkController.cs

+ 5 - 2
TEAMModelOS/Controllers/Common/HomeworkController.cs

@@ -269,14 +269,17 @@ namespace TEAMModelOS.Controllers.Learn
                 };
                 //是否需要进行分页查询,默认不分页
                 bool iscontinuation = false;
+                if (topcout != null && topcout.Value > 0)
+                {
+                    iscontinuation = true;
+                }
                 //如果指定了返回大小
-                if (request.TryGetProperty("continuationToken", out JsonElement continuation))
+                if (request.TryGetProperty("token", out JsonElement continuation))
                 {
                     //指定了cancellationToken 表示需要进行分页
                     if (!continuation.ValueKind.Equals(JsonValueKind.Null) && !continuation.ValueKind.Equals(JsonValueKind.Undefined))
                     {
                         token = continuation.GetString();
-                        iscontinuation = true;
                     }
                 };
                 List<Homework> homeworks = new List<Homework>();