| | |
| | | public R<PageInfo<TSubject>> subjectList(@RequestBody ChoiceSubject query) { |
| | | PageInfo<TSubject> res = new PageInfo<>(query.getPageNumber(), query.getPageSize()); |
| | | QueryWrapper<TSubject> wrapper = new QueryWrapper<>(); |
| | | |
| | | if (StringUtils.hasLength(query.getName())){ |
| | | wrapper.like("name",query.getName()); |
| | | } |
| | |
| | | tStudyListen.setSubject(studyListenDTO.getSubject()); |
| | | tStudyListen.setIntegral(studyListenDTO.getIntegral()); |
| | | tStudyListen.setWeek(week); |
| | | tStudyListen.setIsVip(studyListenDTO.getIsVip()); |
| | | studyListenService.save(tStudyListen); |
| | | } |
| | | studyLookService.remove(new QueryWrapper<TStudyLook>() |
| | |
| | | tStudyLook.setSubject(studyLookDTO.getSubject()); |
| | | tStudyLook.setIntegral(studyLookDTO.getIntegral()); |
| | | tStudyLook.setWeek(week); |
| | | tStudyLook.setIsVip(studyLookDTO.getIsVip()); |
| | | studyLookService.save(tStudyLook); |
| | | } |
| | | studyInductionService.remove(new QueryWrapper<TStudyInduction>() |
| | |
| | | tStudyInduction.setSubject(studyInductionDTO.getSubject()); |
| | | tStudyInduction.setIntegral(studyInductionDTO.getIntegral()); |
| | | tStudyInduction.setWeek(week); |
| | | tStudyInduction.setIsVip(studyInductionDTO.getIsVip()); |
| | | } |
| | | studyAnswerService.remove(new QueryWrapper<TStudyAnswer>() |
| | | .eq("studyId", one.getId()) |
| | |
| | | tStudyAnswer.setAnswerSubject(studyAnswerDTO.getAnswerSubject()); |
| | | tStudyAnswer.setIntegral(studyAnswerDTO.getIntegral()); |
| | | tStudyAnswer.setWeek(week); |
| | | tStudyAnswer.setIsVip(studyAnswerDTO.getIsVip()); |
| | | studyAnswerService.save(tStudyAnswer); |
| | | } |
| | | studyPairService.remove(new QueryWrapper<TStudyPair>() |
| | |
| | | tStudyPair.setSubject(studyPairDTO.getSubject()); |
| | | tStudyPair.setIntegral(studyPairDTO.getIntegral()); |
| | | tStudyPair.setWeek(week); |
| | | tStudyPair.setIsVip(studyPairDTO.getIsVip()); |
| | | studyPairService.save(tStudyPair); |
| | | } |
| | | } |
| | |
| | | tStudy.setType(dto.getType()); |
| | | tStudy.setWeek(dto.getWeek()); |
| | | tStudy.setTitle(dto.getTitle()); |
| | | tStudy.setQuarter(dto.getQuarter()); |
| | | studyService.save(tStudy); |
| | | return R.ok(); |
| | | } |
| | |
| | | List<TStudy> count = studyService.list(new QueryWrapper<TStudy>() |
| | | .eq("type", 1)); |
| | | studyListVO.setWeeks(count.size()); |
| | | |
| | | // todo 补充开始学习人数 |
| | | studyListVO.setCount(0); |
| | | studyListVO.setName("听"); |
| | | // 查询听类型有多少周目 |
| | | res.add(studyListVO); |
| | | // 后续类型 不在1.0功能中 |
| | | for (int i = 1; i <= 6; i++) { |
| | | res.add(new StudyListVO(0,0)); |
| | | } |
| | | StudyListVO studyListVO1 = new StudyListVO(); |
| | | studyListVO1.setWeeks(0); |
| | | studyListVO1.setCount(0); |
| | | studyListVO1.setName("说"); |
| | | res.add(studyListVO1); |
| | | StudyListVO studyListVO2 = new StudyListVO(); |
| | | studyListVO2.setWeeks(0); |
| | | studyListVO2.setCount(0); |
| | | studyListVO2.setName("认读"); |
| | | res.add(studyListVO2); |
| | | StudyListVO studyListVO3 = new StudyListVO(); |
| | | studyListVO3.setWeeks(0); |
| | | studyListVO3.setCount(0); |
| | | studyListVO3.setName("阅读"); |
| | | res.add(studyListVO3); |
| | | StudyListVO studyListVO4 = new StudyListVO(); |
| | | studyListVO4.setWeeks(0); |
| | | studyListVO4.setCount(0); |
| | | studyListVO4.setName("练习"); |
| | | res.add(studyListVO4); |
| | | StudyListVO studyListVO5 = new StudyListVO(); |
| | | studyListVO5.setWeeks(0); |
| | | studyListVO5.setCount(0); |
| | | studyListVO5.setName("智能互动问答"); |
| | | res.add(studyListVO5); |
| | | StudyListVO studyListVO6 = new StudyListVO(); |
| | | studyListVO6.setWeeks(0); |
| | | studyListVO6.setCount(0); |
| | | studyListVO6.setName("智能识别"); |
| | | res.add(studyListVO6); |
| | | return R.ok(res); |
| | | } |
| | | /** |