| | |
| | | if (! CollectionUtils.isEmpty(subjectNames)) { |
| | | item.setSubjectNames(subjectNames.stream().collect(Collectors.joining("、"))); |
| | | } |
| | | item.setTotalQuestionNum(questionSubjectMapper.countQuestionNum(subjects)); |
| | | item.setTotalQuestionNum(questionSubjectMapper.countQuestionNum(subjects, PracticeQuestionTypeEnum.getDataBaseValueByValue(item.getQuestionType()))); |
| | | // 查询已经做了多少 |
| | | PracticeQuestionCondition practiceQuestionCondition = practiceQuestionConditionMapper.selectByPracticeId(item.getId()); |
| | | if (Objects.nonNull(practiceQuestionCondition)) { |
| | |
| | | return RestResponse.ok(questionVO); |
| | | } |
| | | return RestResponse.ok(); |
| | | } |
| | | |
| | | @Override |
| | | public RestResponse subjectQuestionNum(List<Integer> subjectIds) { |
| | | Integer num = questionSubjectMapper.countQuestionNum(subjectIds); |
| | | return RestResponse.ok(num); |
| | | } |
| | | |
| | | @Override |