44323
2023-09-26 7aa9607492e2c0b70838c53083f5362e49e74f44
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){
@@ -374,23 +376,6 @@
            orinPay.setTotalClassHours(0);
            orinPay.setLaveClassHours(0);
            orinPay.setAppUserId(null);
            orinPay.setStudentId(6);
            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);
            Student student = studentClient.queryStudentById(toClassDto.getToStudentId());
            TCoursePackagePayment to = new TCoursePackagePayment();
            to.setStudentId(toClassDto.getToStudentId());
@@ -405,6 +390,28 @@
            paymentService.save(to);
            orinPay.setTotalClassHours(0);
            orinPay.setLaveClassHours(0);
            orinPay.setAppUserId(null);
            orinPay.setStatus(6);
            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);
            CourseCounsum courseCounsum1 = new CourseCounsum();
            courseCounsum1.setInsertTime(new Date());
            courseCounsum1.setReason("赠课");