| | |
| | | model.addAttribute("userName",tAppUser.getName()); |
| | | model.addAttribute("tStudentDto",tStudentDto); |
| | | |
| | | SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd"); |
| | | SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | String formattedDate = dateFormat.format(new Date()); |
| | | model.addAttribute("reDate", formattedDate); |
| | | |
| | |
| | | @RequestMapping("/classList/{tStudentId}") |
| | | @ResponseBody |
| | | public ResultUtil listClass(@PathVariable("tStudentId") Integer tStudentId) { |
| | | // 需要过滤体验课 |
| | | List<ClassListDto> classListDtos = courseStuddentClient.listClass(tStudentId); |
| | | for (ClassListDto classListDto : classListDtos) { |
| | | classListDto.setHasClassHours(classListDto.getTotalClassHours()-classListDto.getLaveClassHours()); |
| | | if (classListDto.getClassType()==2){ |
| | | classListDto.setTotalClassHours(null); |
| | | classListDto.setHasClassHours(null); |
| | | classListDto.setLaveClassHours(null); |
| | | } |
| | | } |
| | | Map<String,List<ClassListDto>> map = new HashMap<>(); |
| | | map.put("items",classListDtos); |
| | | return new ResultUtil<>(0,0,null,map,null); |
| | |
| | | public ResultUtil giftSelect(GiftSearchDto giftSearchDto) { |
| | | |
| | | List<SelectDto> selectDtos = appUserClient.giftSelect(giftSearchDto); |
| | | // 只查询当前用户下 同时也报名了该课程的学员 |
| | | for (SelectDto selectDto : selectDtos) { |
| | | // 获取课包id |
| | | TCoursePackagePayment tCoursePackagePayment = coursePackagePaymentClient.queryCoursePackagePaymentById(giftSearchDto.getId()); |
| | | |
| | | Integer coursePackageId = tCoursePackagePayment.getCoursePackageId(); |
| | | // 学员id 拿到学员id 判断当前学员是否报名了这门课程 |
| | | Long id = selectDto.getId(); |
| | | // |
| | | } |
| | | Map<String,List<SelectDto>> map = new HashMap<>(); |
| | | map.put("options",selectDtos); |
| | | // Map<String,List<SelectDto>> map = new HashMap<>(); |
| | |
| | | ToClassDto toClassDto = new ToClassDto(); |
| | | toClassDto.setToStudentId(toStudentId); |
| | | toClassDto.setId(id); |
| | | |
| | | courseStuddentClient.toClass(toClassDto); |
| | | |
| | | // Map<String,List<SelectDto>> map = new HashMap<>(); |