diff --git a/dl-module-jx/src/main/java/cn/iocoder/yudao/module/jx/controller/admin/DriveSchoolReservationCourseController.java b/dl-module-jx/src/main/java/cn/iocoder/yudao/module/jx/controller/admin/DriveSchoolReservationCourseController.java index 761d1035..a2c20fb7 100644 --- a/dl-module-jx/src/main/java/cn/iocoder/yudao/module/jx/controller/admin/DriveSchoolReservationCourseController.java +++ b/dl-module-jx/src/main/java/cn/iocoder/yudao/module/jx/controller/admin/DriveSchoolReservationCourseController.java @@ -182,9 +182,9 @@ public class DriveSchoolReservationCourseController extends BaseController * 获取首页预约记录 */ @GetMapping(value = "/applet/getReservationCourseList") - public CommonResult getReservationCourseList() - { - return success(driveSchoolReservationCourseService.getReservationCourseList()); + public CommonResult getReservationCourseList(@RequestParam(required = false,defaultValue = "1") Integer pageNum,@RequestParam(required = false,defaultValue = "10") Integer pageSize) + { Page page =new Page(pageNum,pageSize); + return success(driveSchoolReservationCourseService.getReservationCourseList(page)); } /** diff --git a/dl-module-jx/src/main/java/cn/iocoder/yudao/module/jx/mapper/DriveSchoolReservationCourseMapper.java b/dl-module-jx/src/main/java/cn/iocoder/yudao/module/jx/mapper/DriveSchoolReservationCourseMapper.java index ae7f80b3..d62641b5 100644 --- a/dl-module-jx/src/main/java/cn/iocoder/yudao/module/jx/mapper/DriveSchoolReservationCourseMapper.java +++ b/dl-module-jx/src/main/java/cn/iocoder/yudao/module/jx/mapper/DriveSchoolReservationCourseMapper.java @@ -82,7 +82,7 @@ public interface DriveSchoolReservationCourseMapper Integer getPaydNumber(Long deptId); Integer getSignedNumber(Long deptId); - List getReservationCourseList(Long deptId); + IPage getReservationCourseList(Page page,@Param("deptId") Long deptId); public List selectDriveSchoolReservationGetListUser(DriveSchoolReservationCourse driveSchoolReservationCourse); diff --git a/dl-module-jx/src/main/java/cn/iocoder/yudao/module/jx/service/IDriveSchoolReservationCourseService.java b/dl-module-jx/src/main/java/cn/iocoder/yudao/module/jx/service/IDriveSchoolReservationCourseService.java index d070d6d2..1abd7f6f 100644 --- a/dl-module-jx/src/main/java/cn/iocoder/yudao/module/jx/service/IDriveSchoolReservationCourseService.java +++ b/dl-module-jx/src/main/java/cn/iocoder/yudao/module/jx/service/IDriveSchoolReservationCourseService.java @@ -69,7 +69,7 @@ public interface IDriveSchoolReservationCourseService StatisticsVo getHomeData(); - List getReservationCourseList(); + IPage getReservationCourseList(Page page); List selectDriveSchoolReservationGetListUser(DriveSchoolReservationCourse driveSchoolReservationCourse); diff --git a/dl-module-jx/src/main/java/cn/iocoder/yudao/module/jx/service/impl/DriveSchoolReservationCourseServiceImpl.java b/dl-module-jx/src/main/java/cn/iocoder/yudao/module/jx/service/impl/DriveSchoolReservationCourseServiceImpl.java index fa784c7a..b3de722b 100644 --- a/dl-module-jx/src/main/java/cn/iocoder/yudao/module/jx/service/impl/DriveSchoolReservationCourseServiceImpl.java +++ b/dl-module-jx/src/main/java/cn/iocoder/yudao/module/jx/service/impl/DriveSchoolReservationCourseServiceImpl.java @@ -471,12 +471,12 @@ public class DriveSchoolReservationCourseServiceImpl implements IDriveSchoolRese } @Override - public List getReservationCourseList() { + public IPage getReservationCourseList(Page page) { Long userId = SecurityFrameworkUtils.getLoginUserId(); AdminUserRespDTO user = userApi.getUser(userId); Long deptId = user.getDeptId(); - List reservationCourseList = driveSchoolReservationCourseMapper.getReservationCourseList(deptId); - for (DriveSchoolReservationCourse driveSchoolReservationCourse : reservationCourseList) { + IPage reservationCourseList = driveSchoolReservationCourseMapper.getReservationCourseList(page,deptId); + for (DriveSchoolReservationCourse driveSchoolReservationCourse : reservationCourseList.getRecords()) { AdminUserRespDTO sysUserData = userApi.getUser(userId); //SysUser sysUserData = sysUserMapper.findSysUserById(driveSchoolReservationCourse.getUserId());