diff --git a/src/main/java/com/yipin/liuwanr/controller/ExperimentallearningController.java b/src/main/java/com/yipin/liuwanr/controller/ExperimentallearningController.java index 0cc52ce..abdde49 100644 --- a/src/main/java/com/yipin/liuwanr/controller/ExperimentallearningController.java +++ b/src/main/java/com/yipin/liuwanr/controller/ExperimentallearningController.java @@ -23,14 +23,13 @@ public class ExperimentallearningController { * @return */ @GetMapping("/queryExperimentallearning") - Response queryExperimentallearning(@RequestParam Integer studentId,@RequestParam Integer courseId, - @RequestParam Integer pageNo,@RequestParam Integer pageSize) { + Response queryExperimentallearning(@RequestParam Integer studentId,@RequestParam Integer courseId) { Response resp = new Response(); if(StringUtils.isEmpty(studentId)){ resp.setStatus(300); resp.setMessage("学生信息为空"); }else { - HashMap ret = service.queryProject(studentId,courseId,pageNo, pageSize); + HashMap ret = service.queryProject(studentId,courseId); int status = (int) ret.get("retcode"); if (status == 200) { resp.setStatus(status); diff --git a/src/main/java/com/yipin/liuwanr/service/ExperimentallearningService.java b/src/main/java/com/yipin/liuwanr/service/ExperimentallearningService.java index 0f4cc11..d82bd64 100644 --- a/src/main/java/com/yipin/liuwanr/service/ExperimentallearningService.java +++ b/src/main/java/com/yipin/liuwanr/service/ExperimentallearningService.java @@ -39,11 +39,10 @@ public class ExperimentallearningService { * @param courseId * @return */ - public HashMap queryProject(Integer studentId, Integer courseId,Integer pageNo,Integer pageSize) { + public HashMap queryProject(Integer studentId, Integer courseId) { HashMap resp = new HashMap(); try { if(!StringUtils.isEmpty(courseId)&&!StringUtils.isEmpty(studentId)){ - PageHelper.startPage(pageNo, pageSize); Integer experimentalClassId=mapper.queryExperimentalClassId(courseId,studentId); List projectIds = mapper.queryIsAttendance(studentId, courseId); List projects = mapper.getBycourseId(experimentalClassId,courseId); @@ -60,16 +59,7 @@ public class ExperimentallearningService { projects.set(i, project); } } - - PageInfo info=new PageInfo(projects); - int total1 = (int) info.getTotal(); - int totalPages; - totalPages = total1 / pageSize; - if (total1 % pageSize != 0){ - totalPages ++; - } - long total = total1; - resp.put("retvalue", new PageResult(total,projects,totalPages)); + resp.put("retvalue", projects); } resp.put("retcode", 200); }catch(Exception e){