nickchange
2023-11-29 d4fbea2ac7f7c98ffd83480f8f2535ca92f3baea
cloud-server-course/src/main/java/com/dsh/course/controller/CourseStudentController.java
@@ -136,7 +136,9 @@
        System.out.println("==========getClassList===tStudentId====" + tStudentId);
        List<ClassListDto> listDtos = studentService.getClassList(tStudentId);
        for (ClassListDto dto : listDtos) {
            dto.setHasClassHours(dto.getTotalClassHours() - dto.getLaveClassHours());
            if (dto.getClassType()!=2) {
                dto.setHasClassHours(dto.getTotalClassHours() - dto.getLaveClassHours());
            }
        }
        System.out.println("======listDtos======" + listDtos);
        return listDtos;
@@ -521,6 +523,7 @@
            studentClient.frozen(student);
            Integer laveClassHours1 = orinPay.getLaveClassHours();
            Integer appUserId = orinPay.getAppUserId();
            orinPay.setLaveClassHours(0);
            orinPay.setAppUserId(null);
@@ -531,7 +534,7 @@
            CourseCounsum courseCounsum = new CourseCounsum();
            courseCounsum.setInsertTime(new Date());
            courseCounsum.setReason("赠课");
            courseCounsum.setNum(orinPay.getLaveClassHours());
            courseCounsum.setNum(laveClassHours1);
            courseCounsum.setChangeType(0);
            courseCounsum.setPaymentId(orinPay.getId());
            counsumService.save(courseCounsum);
@@ -540,7 +543,7 @@
            CourseCounsum courseCounsum1 = new CourseCounsum();
            courseCounsum1.setInsertTime(new Date());
            courseCounsum1.setReason("赠课");
            courseCounsum1.setNum(orinPay.getLaveClassHours());
            courseCounsum1.setNum(laveClassHours1);
            courseCounsum1.setChangeType(1);
            courseCounsum1.setPaymentId(to.getId());
            counsumService.save(courseCounsum1);