| | |
| | | // 今天周几 |
| | | int i = cn.hutool.core.date.DateUtil.dayOfWeek(new Date())-1; |
| | | |
| | | SimpleDateFormat format = new SimpleDateFormat("MM.dd"); |
| | | SimpleDateFormat format = new SimpleDateFormat("yyyy.MM.dd"); |
| | | ArrayList<String> strings1 = new ArrayList<>(); |
| | | |
| | | for (Integer integer : week) { |
| | |
| | | return ResultUtil.error("当前课包课时数不足"); |
| | | } |
| | | tCoursePackagePayment.setLaveClassHours(tCoursePackagePayment.getLaveClassHours()-req.getNum()); |
| | | this.baseMapper.updateById(tCoursePackagePayment); |
| | | this.baseMapper.updateHoursById(tCoursePackagePayment.getId(),-req.getNum()); |
| | | |
| | | |
| | | TCoursePackage tCoursePackage = tcpmapper.selectById(req.getCourseId()); |
| | |
| | | student1.setReservationStatus(1); |
| | | student1.setInsertTime(new Date()); |
| | | cpsMapper.insert(student1); |
| | | } catch (ParseException e) { |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | |
| | | // 2.0 |
| | | TCourseInfoRecord tCourseInfoRecord = new TCourseInfoRecord(); |
| | | tCourseInfoRecord.setUserId(userId); |
| | | tCourseInfoRecord.setCourseId(req.getOldCourseId()); |
| | | tCourseInfoRecord.setCourseId(req.getCourseId()); |
| | | tCourseInfoRecord.setName("体验购课"); |
| | | tCourseInfoRecord.setNum(req.getNum()); |
| | | tCourseInfoRecord.setTime(new Date()); |