| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | |
| | | |
| | | /** |
| | | * 根据排课id获取预约数据 |
| | | * |
| | | * @param queryCoursePackageStudentList |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/coursePackageStudent/queryCoursePackageStudentList") |
| | | public Page<Map<String, Object>> queryCoursePackageStudentList(@RequestBody QueryCoursePackageStudentList queryCoursePackageStudentList){ |
| | | public Page<Map<String, Object>> queryCoursePackageStudentList(@RequestBody QueryCoursePackageStudentList queryCoursePackageStudentList) { |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(queryCoursePackageStudentList.getLimit(), queryCoursePackageStudentList.getOffset(), |
| | | queryCoursePackageStudentList.getSort(), queryCoursePackageStudentList.getOrder()); |
| | | Page<Map<String, Object>> mapPage = page.setRecords(coursePackageStudentService.queryCoursePackageStudentList(page, queryCoursePackageStudentList)); |
| | |
| | | |
| | | /** |
| | | * 根据id获取数据 |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/coursePackageStudent/queryCoursePackageStudentById") |
| | | public CoursePackageStudent queryCoursePackageStudentById(@RequestBody Long id){ |
| | | public CoursePackageStudent queryCoursePackageStudentById(@RequestBody Long id) { |
| | | return coursePackageStudentService.getById(id); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 修改数据 |
| | | * |
| | | * @param coursePackageStudent |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/coursePackageStudent/editCoursePackageStudent") |
| | | public void editCoursePackageStudent(@RequestBody CoursePackageStudent coursePackageStudent){ |
| | | public void editCoursePackageStudent(@RequestBody CoursePackageStudent coursePackageStudent) { |
| | | coursePackageStudentService.updateById(coursePackageStudent); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 根据排课id获取预约数据 |
| | | * |
| | | * @param coursePackageSchedulingId |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/coursePackageStudent/queryByCoursePackageSchedulingId") |
| | | public List<CoursePackageStudent> queryByCoursePackageSchedulingId(@RequestBody Long coursePackageSchedulingId){ |
| | | return coursePackageStudentService.list(new QueryWrapper<CoursePackageStudent>().eq("coursePackageSchedulingId", coursePackageSchedulingId)); |
| | | public List<CoursePackageStudent> queryByCoursePackageSchedulingId(@RequestBody List<Long> coursePackageSchedulingId) { |
| | | return coursePackageStudentService.list(new QueryWrapper<CoursePackageStudent>().in("coursePackageSchedulingId", coursePackageSchedulingId)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取上课记录数据 |
| | | * |
| | | * @param queryCoursePackageStudent |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/coursePackageStudent/queryCoursePackageStudent") |
| | | public List<CoursePackageStudent> queryCoursePackageStudent(@RequestBody QueryCoursePackageStudent queryCoursePackageStudent){ |
| | | public List<CoursePackageStudent> queryCoursePackageStudent(@RequestBody QueryCoursePackageStudent queryCoursePackageStudent) { |
| | | QueryWrapper<CoursePackageStudent> wrapper = new QueryWrapper<>(); |
| | | if(null != queryCoursePackageStudent.getAppUserId()){ |
| | | if (null != queryCoursePackageStudent.getAppUserId()) { |
| | | wrapper.eq("appUserId", queryCoursePackageStudent.getAppUserId()); |
| | | } |
| | | if(null != queryCoursePackageStudent.getStudentId()){ |
| | | if (null != queryCoursePackageStudent.getStudentId()) { |
| | | wrapper.eq("studentId", queryCoursePackageStudent.getStudentId()); |
| | | } |
| | | if(null != queryCoursePackageStudent.getCoursePackageId()){ |
| | | if (null != queryCoursePackageStudent.getCoursePackageId()) { |
| | | wrapper.eq("coursePackageId", queryCoursePackageStudent.getCoursePackageId()); |
| | | } |
| | | if(null != queryCoursePackageStudent.getCoursePackagePaymentId()){ |
| | | if (null != queryCoursePackageStudent.getCoursePackagePaymentId()) { |
| | | wrapper.eq("coursePackagePaymentId", queryCoursePackageStudent.getCoursePackagePaymentId()); |
| | | } |
| | | if(null != queryCoursePackageStudent.getCoursePackageSchedulingId()){ |
| | | if (null != queryCoursePackageStudent.getCoursePackageSchedulingId()) { |
| | | wrapper.eq("coursePackageSchedulingId", queryCoursePackageStudent.getCoursePackageSchedulingId()); |
| | | } |
| | | if(null != queryCoursePackageStudent.getSignInOrNot()){ |
| | | if (null != queryCoursePackageStudent.getSignInOrNot()) { |
| | | wrapper.eq("signInOrNot", queryCoursePackageStudent.getSignInOrNot()); |
| | | } |
| | | if(null != queryCoursePackageStudent.getReservationStatus()){ |
| | | if (null != queryCoursePackageStudent.getReservationStatus()) { |
| | | wrapper.eq("reservationStatus", queryCoursePackageStudent.getReservationStatus()); |
| | | } |
| | | return coursePackageStudentService.list(wrapper); |
| | |
| | | |
| | | /** |
| | | * 添加学员上课数据 |
| | | * |
| | | * @param coursePackageStudent |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/coursePackageStudent/addCoursePackageStudent") |
| | | public void addCoursePackageStudent(@RequestBody CoursePackageStudent coursePackageStudent){ |
| | | public void addCoursePackageStudent(@RequestBody CoursePackageStudent coursePackageStudent) { |
| | | coursePackageStudent.setInsertTime(new Date()); |
| | | coursePackageStudentService.save(coursePackageStudent); |
| | | } |
| | | } |