puzhibing
2023-12-04 3ad6b6ba2ba56fc0bcd2130e47190779c6e15acc
cloud-server-course/src/main/java/com/dsh/course/controller/CourseStudentController.java
@@ -310,7 +310,7 @@
        List<MoneyBack> ids = moneyBackService.list(new QueryWrapper<MoneyBack>().eq("ids", insertBackDto.getIds()));
        if (ids!=null){
        if (!ids.isEmpty()){
            return 1 ;
        }
@@ -329,7 +329,19 @@
        for (CoursePackageOrderStudent o : pays) {
            o.setStatus(4);
            o.setAppUserId(null);
            List<CoursePackageScheduling> coursePackageSchedulings = coursePackageSchedulingService.selectList(new QueryWrapper<CoursePackageScheduling>().eq("studentId", o.getStudentId()).eq("coursePackageId", o.getCoursePackageId()).ge("classDate", new Date()));
            List<Long> scs = new ArrayList<>();
            for (CoursePackageScheduling coursePackageScheduling : coursePackageSchedulings) {
                scs.add(coursePackageScheduling.getId());
            }
            coursePackageStudentService.remove(new QueryWrapper<CoursePackageStudent>().in("coursePackageSchedulingId",scs));
            coursePackageSchedulingService.deleteBatchIds(scs);
        }
        orderStudentService.updateBatchById(pays);
        return 0;
@@ -360,6 +372,8 @@
    }
    @RequestMapping("/noStatus")
    @ResponseBody
    public void noStatus(@RequestParam("id") Integer id) {
@@ -371,6 +385,7 @@
        for (CoursePackageOrderStudent o : pays) {
            o.setStatus(1);
            o.setAppUserId(null);
            schedulingService.addNewCoursePackageScheduling(o.getId(),o.getLaveClassHours());
        }
        orderStudentService.updateBatchById(pays);
@@ -437,15 +452,15 @@
    @RequestMapping("/backStausClass")
    @ResponseBody
    public void backStausClass(@RequestParam("id") Integer id) {
        MoneyBack byId = moneyBackService.getById(id);
        String[] split = byId.getIds().split(",");
        System.out.println("========split===>" + split);
        List<TCoursePackagePayment> id1 = paymentService.list(new QueryWrapper<TCoursePackagePayment>().in("id", split));
        for (TCoursePackagePayment o : id1) {
            o.setStatus(1);
            o.setAppUserId(null);
        }
        paymentService.updateBatchById(id1);
//        MoneyBack byId = moneyBackService.getById(id);
//        String[] split = byId.getIds().split(",");
//        System.out.println("========split===>" + split);
//        List<CoursePackageOrderStudent> id1 = coursePackageOrderStudentService.list(new QueryWrapper<CoursePackageOrderStudent>().in("id", split));
//        for (CoursePackageOrderStudent o : id1) {
//            o.setStatus(1);
//            o.setAppUserId(null);
//        }
//        coursePackageOrderStudentService.updateBatchById(id1);
    }
    @RequestMapping("/cancel")