Browse Source

修改分页查询

宋悦 8 years ago
parent
commit
9b31145b66

+ 1 - 1
exam-work-api/src/main/java/cn/com/qmth/examcloud/service/examwork/api/ExamApi.java

@@ -47,7 +47,7 @@ public class ExamApi {
     @ApiOperation(value="查询所有考试批次",notes = "分页带查询")
     @GetMapping("/exam/all/{curPage}/{pageSize}")
     public ResponseEntity getAllExam(@ModelAttribute Exam examCriteria, @PathVariable Integer curPage,@PathVariable Integer pageSize){
-    	return new ResponseEntity(examService.getAllExam(examCriteria,new PageRequest(curPage - 1,pageSize)), HttpStatus.OK);
+    	return new ResponseEntity(examService.getAllExam(examCriteria,new PageRequest(curPage,pageSize)), HttpStatus.OK);
     }
 
     @ApiOperation(value="查询所有考试批次",notes = "不分页带查询")

+ 1 - 1
exam-work-api/src/main/java/cn/com/qmth/examcloud/service/examwork/api/ExamCourseApi.java

@@ -32,7 +32,7 @@ public class ExamCourseApi {
 
         Page<ExamStudent> examStudentPage;
         if (StringUtils.isEmpty(courseName)) {
-            examStudentPage = examStudentRepo.findDistinctCourseCode(examId, new PageRequest(curPage - 1, pageSize));
+            examStudentPage = examStudentRepo.findDistinctCourseCode(examId, new PageRequest(curPage, pageSize));
         } else {
             examStudentPage = examStudentRepo.findDistinctCourseCode(examId, '%' + courseName + "%", new PageRequest(curPage - 1, pageSize));
         }

+ 1 - 1
exam-work-api/src/main/java/cn/com/qmth/examcloud/service/examwork/api/ExamScoreApi.java

@@ -26,7 +26,7 @@ public class ExamScoreApi {
     @ApiOperation(value="查询所有考试分数",notes = "分页")
     @GetMapping("/exam_score/all/{curPage}/{pageSize}")
     public ResponseEntity getAllExamScore(@ModelAttribute ExamScore examCriteria, @PathVariable Integer curPage, @PathVariable Integer pageSize){
-        return examScoreService.getAllExamScore(examCriteria,new PageRequest(curPage - 1,pageSize));
+        return examScoreService.getAllExamScore(examCriteria,new PageRequest(curPage,pageSize));
     }
 
     @ApiOperation(value="查询所有考试分数",notes = "不分页")

+ 1 - 1
exam-work-api/src/main/java/cn/com/qmth/examcloud/service/examwork/api/ExamStudentApi.java

@@ -70,7 +70,7 @@ public class ExamStudentApi {
             examStudent.setRootOrgId(accessUser.getRootOrgId());
         }
         return new ResponseEntity(examStudentService.getAllExamStudent(examStudent,
-                new PageRequest(curPage - 1, pageSize)), HttpStatus.OK);
+                new PageRequest(curPage, pageSize)), HttpStatus.OK);
     }
 
     @ApiOperation(value = "查询所有考试学生带条件", notes = "带条件不分页")