lrf402788946 %!s(int64=4) %!d(string=hai) anos
pai
achega
d5d4970b83
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      app/service/student.js

+ 1 - 1
app/service/student.js

@@ -316,7 +316,7 @@ class StudentService extends CrudService {
     let num = 0;
     for (const student of studentList) {
       // 先判断是否超过第10位,超过就跳出
-      if (num > 10) break;
+      if (num >= 10) break;
       const { score, is_fine, job, name, _id } = student;
       console.log(`${name}-${job}:${score};${is_fine} ;${num}`);
       // 最开始初始化过所有人的状态,并且将干部和不能评优的人都过滤出去,所以正常学生应该都是没有评优,如果此处已经是优秀,那么就是和前人同分改的,直接跳过就好