| | |
| | | import com.dsh.course.feignClient.competition.CompetitionClient; |
| | | import com.dsh.course.feignClient.competition.model.ListQuery; |
| | | import com.dsh.course.feignClient.course.CoursePackageClient; |
| | | import com.dsh.course.feignClient.course.CoursePackagePaymentClient; |
| | | import com.dsh.course.feignClient.course.CourseStuddentClient; |
| | | import com.dsh.course.feignClient.course.model.TCoursePackage; |
| | | import com.dsh.course.feignClient.course.model.TCoursePackagePayment; |
| | |
| | | private CompetitionClient competitionClient; |
| | | @Autowired |
| | | private ICityService cityService; |
| | | @Autowired |
| | | private CoursePackagePaymentClient coursePackagePaymentClient; |
| | | |
| | | @RequestMapping("download") |
| | | public void down(HttpServletRequest request, HttpServletResponse response) throws IOException { |
| | |
| | | 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); |
| | | |
| | |
| | | //查询学员信息 |
| | | TStudentDto tStudentDto = itStudentService.listOne(tStudentId); |
| | | model.addAttribute("item", tStudentDto); |
| | | if (tStudentDto.getLateralSurface()!=null) { |
| | | if (tStudentDto.getLateralSurface()!=null&&!tStudentDto.getLateralSurface().equals("")) { |
| | | String[] pics = tStudentDto.getLateralSurface().split(";"); |
| | | model.addAttribute("pic1", pics[0]); |
| | | System.out.println("=====pic1==" + pics[0]); |
| | | if (pics.length > 1) { |
| | | model.addAttribute("pic2", pics[1]); |
| | | System.out.println("=====pic2==" + pics[1]); |
| | | } |
| | | if (pics.length > 2) { |
| | | model.addAttribute("pic3", pics[2]); |
| | | System.out.println("=====pic3==" + pics[2]); |
| | | if (pics.length>0) { |
| | | model.addAttribute("pic1", pics[0]); |
| | | System.out.println("=====pic1==" + pics[0]); |
| | | if (pics.length > 1) { |
| | | model.addAttribute("pic2", pics[1]); |
| | | System.out.println("=====pic2==" + pics[1]); |
| | | } |
| | | if (pics.length > 2) { |
| | | model.addAttribute("pic3", pics[2]); |
| | | System.out.println("=====pic3==" + pics[2]); |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | System.out.println("======>t"+tStudentId); |
| | | //查询学员信息 |
| | | TStudentDto tStudentDto = itStudentService.listOne(tStudentId); |
| | | // 查询该学员第一次购买课包的时间 |
| | | String time = coursePackagePaymentClient.getTime(tStudentId); |
| | | SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); |
| | | try { |
| | | if (time!=null){ |
| | | Date parse = format.parse(time); |
| | | tStudentDto.setTime(parse); |
| | | } |
| | | } catch (ParseException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | |
| | | model.addAttribute("item", tStudentDto); |
| | | if (tStudentDto.getLateralSurface()!=null) { |
| | | if (tStudentDto.getLateralSurface()!=null&&!tStudentDto.equals("")) { |
| | | String[] pics = tStudentDto.getLateralSurface().split(";"); |
| | | model.addAttribute("pic1", pics[0]); |
| | | System.out.println("=====pic1==" + pics[0]); |
| | |
| | | |
| | | List<Map<String,Object>> maps = studentClient.listCom(id); |
| | | |
| | | |
| | | |
| | | return maps; |
| | | } |
| | | |
| | |
| | | evaluateStudent.setImgs(image); |
| | | // evaluateStudent.setInsertTime(new Date()); |
| | | |
| | | |
| | | User user = UserExt.getUser(); |
| | | evaluateStudent.setCoachId(user.getId()); |
| | | appUserClient.save(evaluateStudent); |
| | | // evaluateStudentService.save(evaluateStudent); |
| | | |
| | |
| | | @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); |
| | |
| | | //// insertBackDto.setIds(ids); |
| | | // System.out.println("=====insertBackDto========"+insertBackDto); |
| | | |
| | | courseStuddentClient.changeStatus(id); |
| | | courseStuddentClient.noStatus(id); |
| | | courseStuddentClient.backStausClass(id); |
| | | // courseStuddentClient.zeroClass(id); |
| | | |
| | |
| | | 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<>(); |