| | |
| | | //获取可转移学员 |
| | | @RequestMapping("/getSelect") |
| | | @ResponseBody |
| | | public List<SelectDto> getSelect(@RequestParam("payId")Integer payId){ |
| | | public List<SelectDto> getSelect(@RequestParam("payId")Long payId){ |
| | | |
| | | List<Integer> studentIds = paymentService.getStudentIds(payId); |
| | | System.out.println("=========studentIds=================>"+studentIds); |
| | | |
| | | if (studentIds.size()>0){ |
| | | List<SelectDto> selectDtos = appUserClient.getSelects(studentIds); |
| | | |
| | | return selectDtos; |
| | | return selectDtos;} |
| | | else return null; |
| | | } |
| | | |
| | | |
| | |
| | | moneyBack.setIds(insertBackDto.getIds()); |
| | | moneyBackService.save(moneyBack); |
| | | |
| | | List<TCoursePackagePayment> pays = paymentService.list(new QueryWrapper<TCoursePackagePayment>().in("id", insertBackDto.getIds())); |
| | | for (TCoursePackagePayment o :pays){ |
| | | o.setStatus(4); |
| | | o.setAppUserId(null); |
| | | } |
| | | |
| | | |
| | | |
| | | paymentService.updateBatchById(pays); |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | } |
| | | |
| | | @RequestMapping("/noStatus") |
| | | @ResponseBody |
| | | public void noStatus(@RequestParam("id")Integer id){ |
| | | MoneyBack byId = moneyBackService.getById(id); |
| | | byId.setStatus(2); |
| | | moneyBackService.updateById(byId); |
| | | |
| | | } |
| | | |
| | | @RequestMapping("/zeroClass") |
| | | @ResponseBody |
| | | public void zeroClass(@RequestParam("id")Integer id){ |
| | |
| | | System.out.println("========split===>"+split); |
| | | List<TCoursePackagePayment> id1 = paymentService.list(new QueryWrapper<TCoursePackagePayment>().in("id", split)); |
| | | for (TCoursePackagePayment o :id1){ |
| | | CourseCounsum courseCounsum = new CourseCounsum(); |
| | | courseCounsum.setNum(o.getLaveClassHours()); |
| | | courseCounsum.setChangeType(0); |
| | | courseCounsum.setReason("退费"); |
| | | courseCounsum.setPaymentId(o.getId()); |
| | | courseCounsum.setInsertTime(new Date()); |
| | | counsumService.save(courseCounsum); |
| | | |
| | | o.setTotalClassHours(0); |
| | | o.setLaveClassHours(0); |
| | | o.setStatus(2); |
| | | o.setAppUserId(null); |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | paymentService.updateBatchById(id1); |
| | | } |
| | | |
| | | |
| | | @RequestMapping("/backStausClass") |
| | | @ResponseBody |
| | | public void backStausClass(@RequestParam("id")Integer id){ |
| | | MoneyBack byId = moneyBackService.getById(id); |
| | | String[] split = byId.getIds().split(","); |
| | | System.out.println("========split===>"+split); |
| | | List<TCoursePackagePayment> id1 = paymentService.list(new QueryWrapper<TCoursePackagePayment>().in("id", split)); |
| | | for (TCoursePackagePayment o :id1){ |
| | | o.setStatus(1); |
| | | o.setAppUserId(null); |
| | | } |
| | | paymentService.updateBatchById(id1); |
| | | } |
| | | @RequestMapping("/cancel") |
| | | @ResponseBody |
| | | public void cancel(@RequestParam("ids")String ids){ |
| | | String[] split = ids.split(","); |
| | | List<CoursePackageStudent> coursePackagePaymentId = studentService.list(new QueryWrapper<CoursePackageStudent>().in("coursePackagePaymentId", split)); |
| | | for (CoursePackageStudent student :coursePackagePaymentId){ |
| | | student.setReservationStatus(2); |
| | | student.setReservationStatus(3); |
| | | student.setAppUserId(null); |
| | | } |
| | | studentService.updateBatchById(coursePackagePaymentId); |
| | |
| | | |
| | | orinPay.setTotalClassHours(0); |
| | | orinPay.setLaveClassHours(0); |
| | | orinPay.setStatus(5); |
| | | orinPay.setAppUserId(null); |
| | | paymentService.updateById(orinPay); |
| | | |
| | | CourseCounsum courseCounsum = new CourseCounsum(); |
| | | courseCounsum.setInsertTime(new Date()); |
| | | courseCounsum.setReason("转课"); |
| | | if (orinPay.getAppUserId()!=studentPay.getAppUserId()){ |
| | | courseCounsum.setReason("赠课"); |
| | | }else { courseCounsum.setReason("转课"); |
| | | } |
| | | courseCounsum.setNum(laveClassHours); |
| | | courseCounsum.setChangeType(0); |
| | | courseCounsum.setPaymentId(orinPay.getId()); |
| | |
| | | orinPay.setTotalClassHours(0); |
| | | orinPay.setLaveClassHours(0); |
| | | orinPay.setAppUserId(null); |
| | | orinPay.setStudentId(6); |
| | | paymentService.updateById(orinPay); |
| | | |
| | | |