44323
2023-10-07 e6ee956618b3c1a6371a6c22dfbb70868dbd3f17
cloud-server-course/src/main/java/com/dsh/course/controller/CourseStudentController.java
@@ -38,6 +38,17 @@
    CoursePackageStudentService studentService ;
    @Autowired
    TCoursePackagePaymentService paymentService;
    @Autowired
    private CourseCounsumService counsumService;
    //获取退费记录
    @RequestMapping("/getRefund")
    @ResponseBody
    public List<MoneyBack> getRefund() {
        // 查询已通过申请的退费记录
       return counsumService.getRefund();
    }
    //获取学员课时数信息
    @RequestMapping("/getInfo")
    @ResponseBody
@@ -175,8 +186,7 @@
        return selectDtos;
    }
    @Autowired
    private CourseCounsumService counsumService;
    @RequestMapping("/queryCounsum")
    @ResponseBody
    public List<CourseCounsum> queryCounsum(@RequestBody ConsumeQuery consumeQuery){
@@ -373,23 +383,6 @@
            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);
            orinPay.setLaveClassHours(0);
            orinPay.setAppUserId(null);
            orinPay.setStudentId(6);
            paymentService.updateById(orinPay);
@@ -407,6 +400,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("赠课");