luo
2023-09-26 d954784593cb24b0455529ea28588a317c5d766f
cloud-server-course/src/main/java/com/dsh/course/controller/CourseStudentController.java
@@ -107,7 +107,9 @@
    @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){
@@ -371,7 +373,13 @@
            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);
@@ -381,13 +389,7 @@
            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);