CrazyIter_Bin 3 年之前
父节点
当前提交
9316f07f5f
共有 1 个文件被更改,包括 50 次插入47 次删除
  1. 50 47
      TEAMModelOS/Controllers/Common/LessonRecordController.cs

+ 50 - 47
TEAMModelOS/Controllers/Common/LessonRecordController.cs

@@ -110,53 +110,7 @@ namespace TEAMModelOS.Controllers
             return Ok(new { count=count });
         }
 
-        private Dictionary<string, object> GetLessonCond(JsonElement request) {
-            Dictionary<string, object> dict = new Dictionary<string, object>();
-
-            if (request.TryGetProperty("tmdid", out JsonElement tmdid) && !string.IsNullOrWhiteSpace($"{tmdid}"))
-            {
-                dict.Add("tmdid", tmdid);
-            }
-            if (request.TryGetProperty("courseId", out JsonElement courseId) && !string.IsNullOrWhiteSpace($"{courseId}"))
-            {
-                dict.Add("courseId", courseId);
-            }
-            if (request.TryGetProperty("periodId", out JsonElement periodId) && !string.IsNullOrWhiteSpace($"{periodId}"))
-            {
-                dict.Add("periodId", periodId);
-            }
-            if (request.TryGetProperty("subjectId", out JsonElement subjectId))
-            {
-                dict.Add("subjectId[*]", subjectId);
-            }
-            if (request.TryGetProperty("groupIds", out JsonElement groupIds))
-            {
-                dict.Add("groupIds[*]", groupIds);
-            }
-            if (request.TryGetProperty("grade", out JsonElement grade))
-            {
-                dict.Add("grade[*]", grade);
-            }
-            if (request.TryGetProperty("category", out JsonElement category))
-            {
-                dict.Add("category[*]", category);
-            }
-            if (request.TryGetProperty("doubleGreen", out JsonElement doubleGreen) && doubleGreen.GetBoolean())
-            {
-                dict.Add(">=.tScore", 70);
-                dict.Add(">=.pScore", 70);
-            }
-            if (request.TryGetProperty("quality", out JsonElement quality) && quality.GetBoolean())
-            {
-                dict.Add(">=.discuss", 1);
-            }
-
-            if (request.TryGetProperty("name", out JsonElement name) && !string.IsNullOrWhiteSpace($"{name}"))
-            {
-                dict.Add("$.name", name);
-            }
-            return dict;
-        }
+      
         /// <summary>
         /// 获取开课记录
         /// </summary>
@@ -254,5 +208,54 @@ namespace TEAMModelOS.Controllers
             }
            
         }
+
+        private Dictionary<string, object> GetLessonCond(JsonElement request)
+        {
+            Dictionary<string, object> dict = new Dictionary<string, object>();
+
+            if (request.TryGetProperty("tmdid", out JsonElement tmdid) && !string.IsNullOrWhiteSpace($"{tmdid}"))
+            {
+                dict.Add("tmdid", tmdid);
+            }
+            if (request.TryGetProperty("courseId", out JsonElement courseId) && !string.IsNullOrWhiteSpace($"{courseId}"))
+            {
+                dict.Add("courseId", courseId);
+            }
+            if (request.TryGetProperty("periodId", out JsonElement periodId) && !string.IsNullOrWhiteSpace($"{periodId}"))
+            {
+                dict.Add("periodId", periodId);
+            }
+            if (request.TryGetProperty("subjectId", out JsonElement subjectId))
+            {
+                dict.Add("subjectId[*]", subjectId);
+            }
+            if (request.TryGetProperty("groupIds", out JsonElement groupIds))
+            {
+                dict.Add("groupIds[*]", groupIds);
+            }
+            if (request.TryGetProperty("grade", out JsonElement grade))
+            {
+                dict.Add("grade[*]", grade);
+            }
+            if (request.TryGetProperty("category", out JsonElement category))
+            {
+                dict.Add("category[*]", category);
+            }
+            if (request.TryGetProperty("doubleGreen", out JsonElement doubleGreen) && doubleGreen.GetBoolean())
+            {
+                dict.Add(">=.tScore", 70);
+                dict.Add(">=.pScore", 70);
+            }
+            if (request.TryGetProperty("quality", out JsonElement quality) && quality.GetBoolean())
+            {
+                dict.Add(">=.discuss", 1);
+            }
+
+            if (request.TryGetProperty("name", out JsonElement name) && !string.IsNullOrWhiteSpace($"{name}"))
+            {
+                dict.Add("$.name", name);
+            }
+            return dict;
+        }
     }
 }