Explorar o código

fix: 修复我的评测分页bug

weijin %!s(int64=4) %!d(string=hai) anos
pai
achega
927b6690f6

+ 1 - 1
src/main/java/com/nju/edu/eval/service/serviceImpl/ExamServiceImpl.java

@@ -171,7 +171,7 @@ public class ExamServiceImpl implements ExamService {
                             .skip(pageSize * (pageNum - 1)).limit(pageSize)
                             .map(ExamConvertor::convertToJoinedVO).collect(Collectors.toList()),
                     //输出总个数,用于前端分页
-                    (int) exams.stream().filter(exam -> state == 0 || exam.getState().ordinal() + 1 == state).count());
+                    (int) exams.stream().filter(exam -> state == 0 || exam.getState().ordinal() + 1 == state).filter(exam -> !exam.getIsHidden()).count());
         } else {
             throw new MyServiceException("A0201", "用户账号不存在");
         }