nickchange
2023-10-31 986989a2b7a49353598fda317e3bdaed59f09abc
cloud-server-course/src/main/java/com/dsh/course/controller/CourseStudentController.java
@@ -488,7 +488,7 @@
    private StudentClient studentClient;
    @RequestMapping(value = "/toHoli",produces = MediaType.APPLICATION_JSON_UTF8_VALUE, consumes = "application/json;charset=UTF-8")
    @ResponseBody
    public String toHoli(@RequestBody ToHoliDto toHoliDto){
    public String toHoli(@RequestBody ToHoliDto toHoliDto) throws ParseException {
        String [] ids = toHoliDto.getIds();
        List<String> strings = new ArrayList<>();
@@ -555,7 +555,6 @@
                        CoursePackageScheduling coursePackageScheduling = new CoursePackageScheduling();
                        coursePackageScheduling.setCoursePackageId(tCoursePackage.getId());
                        try {
                            Date parse = format1.parse(format.format(time) + " " + split[i1]);
                            Date parse1 = format1.parse(format.format(time) + " " + split1[i1]);
                            coursePackageScheduling.setClassDate(parse);
@@ -573,9 +572,6 @@
                            student1.setReservationStatus(1);
                            student1.setInsertTime(new Date());
                            studentService.save(student1);
                        } catch (ParseException e) {
                            e.printStackTrace();
                        }
                    }
@@ -592,7 +588,6 @@
                        for (int i1 = 0; i1 < split.length; i1++) {
                            CoursePackageScheduling coursePackageScheduling = new CoursePackageScheduling();
                            coursePackageScheduling.setCoursePackageId(tCoursePackage.getId());
                            try {
                                Date parse = format1.parse(format.format(time) + " " + split[i1]);
                                Date parse1 = format1.parse(format.format(time) + " " + split1[i1]);
                                coursePackageScheduling.setClassDate(parse);
@@ -610,9 +605,6 @@
                                student1.setReservationStatus(1);
                                student1.setInsertTime(new Date());
                                studentService.save(student1);
                            } catch (ParseException e) {
                                e.printStackTrace();
                            }
                        }
                    }
@@ -624,7 +616,6 @@
                    for (int i1 = 0; i1 < split.length; i1++) {
                        CoursePackageScheduling coursePackageScheduling = new CoursePackageScheduling();
                        coursePackageScheduling.setCoursePackageId(tCoursePackage.getId());
                        try {
                            Date parse = format1.parse(format.format(time) + " " + split[i1]);
                            Date parse1 = format1.parse(format.format(time) + " " + split1[i1]);
                            coursePackageScheduling.setClassDate(parse);
@@ -642,9 +633,6 @@
                            student1.setReservationStatus(1);
                            student1.setInsertTime(new Date());
                            studentService.save(student1);
                        } catch (ParseException e) {
                            e.printStackTrace();
                        }
                    }
                }
            }
@@ -699,7 +687,7 @@
    @RequestMapping(value = "/toTrans",produces = MediaType.APPLICATION_JSON_UTF8_VALUE, consumes = "application/json;charset=UTF-8")
    @ResponseBody
    public String toTrans(@RequestBody ToHoliDto toHoliDto){
    public String toTrans(@RequestBody ToHoliDto toHoliDto) throws ParseException {
        String [] ids = toHoliDto.getIds();
        List<String> strings = new ArrayList<>();
@@ -769,7 +757,6 @@
                        CoursePackageScheduling coursePackageScheduling = new CoursePackageScheduling();
                        coursePackageScheduling.setCoursePackageId(tCoursePackage.getId());
                        try {
                            Date parse = format1.parse(format.format(time) + " " + split[i1]);
                            Date parse1 = format1.parse(format.format(time) + " " + split1[i1]);
                            coursePackageScheduling.setClassDate(parse);
@@ -787,9 +774,6 @@
                            student1.setReservationStatus(1);
                            student1.setInsertTime(new Date());
                            studentService.save(student1);
                        } catch (ParseException e) {
                            e.printStackTrace();
                        }
                    }
@@ -806,7 +790,6 @@
                        for (int i1 = 0; i1 < split.length; i1++) {
                            CoursePackageScheduling coursePackageScheduling = new CoursePackageScheduling();
                            coursePackageScheduling.setCoursePackageId(tCoursePackage.getId());
                            try {
                                Date parse = format1.parse(format.format(time) + " " + split[i1]);
                                Date parse1 = format1.parse(format.format(time) + " " + split1[i1]);
                                coursePackageScheduling.setClassDate(parse);
@@ -824,9 +807,6 @@
                                student1.setReservationStatus(1);
                                student1.setInsertTime(new Date());
                                studentService.save(student1);
                            } catch (ParseException e) {
                                e.printStackTrace();
                            }
                        }
                    }
@@ -838,7 +818,6 @@
                    for (int i1 = 0; i1 < split.length; i1++) {
                        CoursePackageScheduling coursePackageScheduling = new CoursePackageScheduling();
                        coursePackageScheduling.setCoursePackageId(tCoursePackage.getId());
                        try {
                            Date parse = format1.parse(format.format(time) + " " + split[i1]);
                            Date parse1 = format1.parse(format.format(time) + " " + split1[i1]);
                            coursePackageScheduling.setClassDate(parse);
@@ -856,9 +835,6 @@
                            student1.setReservationStatus(1);
                            student1.setInsertTime(new Date());
                            studentService.save(student1);
                        } catch (ParseException e) {
                            e.printStackTrace();
                        }
                    }
                }
            }