| | |
| | | @ResponseBody |
| | | public List<SelectDto> getSelect(@RequestParam("payId")Long payId){ |
| | | |
| | | List<Integer> studentIds = paymentService.getStudentIds(payId); |
| | | TCoursePackagePayment byId = paymentService.getById(payId); |
| | | |
| | | List<Integer> studentIds = paymentService.getStudentIds(payId,byId.getCoursePackageId(),byId.getAppUserId()); |
| | | System.out.println("=========studentIds=================>"+studentIds); |
| | | |
| | | if (studentIds.size()>0){ |
| | |
| | | counsumService.save(courseCounsum1); |
| | | |
| | | }else { |
| | | |
| | | CourseCounsum courseCounsum = new CourseCounsum(); |
| | | courseCounsum.setInsertTime(new Date()); |
| | | courseCounsum.setReason("赠课"); |
| | | courseCounsum.setNum(orinPay.getLaveClassHours()); |
| | | courseCounsum.setChangeType(0); |
| | | courseCounsum.setPaymentId(orinPay.getId()); |
| | | counsumService.save(courseCounsum); |
| | | |
| | | |
| | | orinPay.setTotalClassHours(0); |
| | |
| | | paymentService.updateById(orinPay); |
| | | |
| | | |
| | | CourseCounsum courseCounsum = new CourseCounsum(); |
| | | courseCounsum.setInsertTime(new Date()); |
| | | courseCounsum.setReason("赠课"); |
| | | courseCounsum.setNum(orinPay.getLaveClassHours()); |
| | | courseCounsum.setChangeType(0); |
| | | courseCounsum.setPaymentId(orinPay.getId()); |
| | | counsumService.save(courseCounsum); |
| | | |
| | | |
| | | |
| | | |