CrazyIter_Bin 1 ano atrás
pai
commit
c4acb5aca8
1 arquivos alterados com 3 adições e 0 exclusões
  1. 3 0
      TEAMModelOS.SDK/Models/Service/OpenApiService.cs

+ 3 - 0
TEAMModelOS.SDK/Models/Service/OpenApiService.cs

@@ -1717,6 +1717,9 @@ namespace TEAMModelOS.SDK
                 }
                 School schoolBase = await client.GetContainer(Constant.TEAMModelOS, Constant.School).ReadItemAsync<School>($"{schoolCode}", new PartitionKey("Base"));
                 List<PortraitStudent> students = _students.ToObject<List<PortraitStudent>>();
+                if (students.IsEmpty()) { 
+                    return responseData = new() { code = RespondCode.ParamsError, msg = "没有学生数据" };
+                }
                 List<(Student studentBase, PortraitStudent portrait)> studentsBases = new List<(Student, PortraitStudent)>();
                 //学生信息不匹配的
                 List<PortraitStudent> unmatchStuInfo = new List<PortraitStudent>();