瀏覽代碼

修改学生分页

宋悦 8 年之前
父節點
當前提交
b1ee9645e5
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      core-api/src/main/java/cn/com/qmth/examcloud/service/core/api/StudentApi.java

+ 1 - 1
core-api/src/main/java/cn/com/qmth/examcloud/service/core/api/StudentApi.java

@@ -44,7 +44,7 @@ public class StudentApi {
     @ApiOperation(value="查询所有学生",notes="分页")
     @GetMapping("/{curPage}/{pageSize}")
     public ResponseEntity getAllStudent(@ModelAttribute Student studentCriteria, @PathVariable Integer curPage, @PathVariable Integer pageSize){
-        return new ResponseEntity(studentService.getAllStudent(studentCriteria,new PageRequest(curPage - 1,pageSize)),HttpStatus.OK);
+        return new ResponseEntity(studentService.getAllStudent(studentCriteria,new PageRequest(curPage,pageSize)),HttpStatus.OK);
     }
 
     @ApiOperation(value="查询所有学生",notes="不分页")