| | |
| | | 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()); |
| | | if (StringUtils.hasLength(query.getName())){ |
| | | wrapper.like("name",query.getName()); |
| | | } |
| | | if (StringUtils.hasLength(query.getEnglish())) { |
| | | wrapper.like("english", query.getEnglish()); |
| | |
| | | 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); |
| | | } |
| | | |