Przeglądaj źródła

处理classes为空。

CrazyIter_Bin 4 lat temu
rodzic
commit
a380e482b9
1 zmienionych plików z 3 dodań i 2 usunięć
  1. 3 2
      TEAMModelFunction/TriggerStuActivity.cs

+ 3 - 2
TEAMModelFunction/TriggerStuActivity.cs

@@ -37,8 +37,9 @@ namespace TEAMModelFunction
         }
          
         public  static async Task<(List<string> tmdids,List<Students> studentss)> GetStuList(  CosmosClient client, List<string> classes,string  school) {
-            if (!classes.IsNotEmpty()) { return (null, null); }
+            List<string> tmdids = new List<string>();
             List<Students> studentss = new List<Students>();
+            if (!classes.IsNotEmpty()) { return (tmdids, studentss); }
             List<string> sqlList = new List<string>();
             classes.ForEach(x => { sqlList.Add($" '{x}' "); });
             string sql = string.Join(" , ", sqlList);
@@ -64,7 +65,7 @@ namespace TEAMModelFunction
             {
                 tchLists.Add(item);
             }
-            List<string> tmdids = new List<string>();
+          
             schList.ForEach(x => { 
                 if (x.students.IsNotEmpty()) 
                 {