|
@@ -1618,46 +1618,6 @@ public class KmtExerciseServiceImpl implements KmtExerciseService {
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
- @Override
|
|
|
- public Map<String, Object> findExerciseErrorQuestions(PageReq req, String userId) {
|
|
|
- Map<String, Object> data = new HashMap<>();
|
|
|
- Page page = new Page(req.getPageNo(), req.getPageSize());
|
|
|
- List<KmtExerciseQuestionErrors> questionErrors = kmtExerciseMapper.findKmtExerciseQuestionByErrorUserId(userId, page);
|
|
|
- if (CollectionUtils.isNotEmpty(questionErrors)){
|
|
|
- List<String> userIds = this.findUserIdsInExerciseQuestionList(questionErrors);
|
|
|
- List<TbLibManager> users = null;
|
|
|
- if (CollectionUtils.isNotEmpty(userIds)){
|
|
|
- Integer[] types = {17, 18};
|
|
|
- users = libManagerMapper.findTbLibManagerByUserIdsAndType(userIds, Arrays.asList(types));
|
|
|
- }
|
|
|
-
|
|
|
- List<ExerciseBookCourseClassDto> list = kmtExerciseMapperService.findClassifyQuestionsByIds(questionErrors.stream().map(question -> question.getQuestionId()).collect(Collectors.toList()));
|
|
|
- if (list != null){
|
|
|
- for (ExerciseBookCourseClassDto parentQuetion : list){
|
|
|
- for (ExerciseQuetionDto childQuestion : parentQuetion.getList()){
|
|
|
- for (KmtExerciseQuestionErrors qe : questionErrors){
|
|
|
- if (qe.getQuestionId().equals(childQuestion.getQuestionId())){
|
|
|
- childQuestion.setFromUserId(qe.getSetErrorUserId());
|
|
|
- childQuestion.setToUserId(qe.getErrorUserId());
|
|
|
- childQuestion.appendUserNameByIds(users);
|
|
|
- childQuestion.setFromUser(kmtExerciseQuestionService.getAuthorityByType(qe.getSetErrorUserAuth()) + childQuestion.getFromUser());
|
|
|
- childQuestion.setToUser(kmtExerciseQuestionService.getAuthorityByType(qe.getErrorUserAuth()) + childQuestion.getToUser());
|
|
|
- childQuestion.setReason(qe.getErrorReason());
|
|
|
- childQuestion.setErrorReasonImage(qe.getErrorReasonImage());
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- data.put("list", list);
|
|
|
- }
|
|
|
- }
|
|
|
- data.put("pageNo", page.getCurrent());
|
|
|
- data.put("pageSize", page.getSize());
|
|
|
- data.put("pages", page.getPages());
|
|
|
- data.put("total", page.getTotal());
|
|
|
- return data;
|
|
|
- }
|
|
|
|
|
|
/**
|
|
|
* 从题目列表中提取四个用户的id
|
|
@@ -1839,4 +1799,14 @@ public class KmtExerciseServiceImpl implements KmtExerciseService {
|
|
|
return kmtExerciseQuestionService.findQuestionRollbackRecord(questionId);
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public Map<String, Object> findExerciseErrorQuestions(QuestionErrorListVo req, String userId) {
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public Map<String, Object> findErrorExerciseBooks(String userId, String bookName) {
|
|
|
+ return null;
|
|
|
+ }
|
|
|
}
|