|
|
|
@ -19,6 +19,7 @@ import org.springframework.http.HttpStatus;
|
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -130,9 +131,27 @@ public class TopicController {
|
|
|
|
|
@PostMapping("/getObjectiveCountByChapterId")
|
|
|
|
|
@ApiOperation("根据章节查看题目类型数量/模拟认证题库通用")
|
|
|
|
|
@AnonymousAccess
|
|
|
|
|
private ResultEntity<List<TopicDto>> getObjectiveCountByChapterId(@ApiParam("普通题库/金融智能/银行从业") @RequestParam String outLine,
|
|
|
|
|
@RequestParam(required = false) String chapterId) {
|
|
|
|
|
return new ResultEntity<>(objectiveQuestionMapper.getObjectiveCountByChapterId(outLine, chapterId));
|
|
|
|
|
private ResultEntity<List<TopicDto>> getObjectiveCountByChapterId(@ApiParam("普通题库/金融智能/银行从业") @RequestParam String outLine) {
|
|
|
|
|
List<TopicDto> list = new ArrayList<>();
|
|
|
|
|
if (outLine.equals("金融智能")) {
|
|
|
|
|
List<TopicDto> list1 = objectiveQuestionMapper.getObjectiveCountByChapterId("金融智能", "13");
|
|
|
|
|
List<TopicDto> list2 = objectiveQuestionMapper.getObjectiveCountByChapterId("金融智能", "14");
|
|
|
|
|
list.addAll(list2);
|
|
|
|
|
list.addAll(list1);
|
|
|
|
|
}
|
|
|
|
|
if (outLine.equals("银行从业")) {
|
|
|
|
|
List<TopicDto> list1 = objectiveQuestionMapper.getObjectiveCountByChapterId("银行从业", "15");
|
|
|
|
|
List<TopicDto> list2 = objectiveQuestionMapper.getObjectiveCountByChapterId("银行从业", "16");
|
|
|
|
|
List<TopicDto> list3 = objectiveQuestionMapper.getObjectiveCountByChapterId("银行从业", "17");
|
|
|
|
|
List<TopicDto> list4 = objectiveQuestionMapper.getObjectiveCountByChapterId("银行从业", "18");
|
|
|
|
|
List<TopicDto> list5 = objectiveQuestionMapper.getObjectiveCountByChapterId("银行从业", "19");
|
|
|
|
|
list.addAll(list2);
|
|
|
|
|
list.addAll(list1);
|
|
|
|
|
list.addAll(list3);
|
|
|
|
|
list.addAll(list4);
|
|
|
|
|
list.addAll(list5);
|
|
|
|
|
}
|
|
|
|
|
return new ResultEntity<>(list);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -148,7 +167,7 @@ public class TopicController {
|
|
|
|
|
@RequestParam(required = false) String schoolId,
|
|
|
|
|
@RequestParam String chapterId) {
|
|
|
|
|
PageHelper.startPage(index, size);
|
|
|
|
|
List<ObjectiveQuestionWithBLOBs> list = objectiveQuestionMapper.getObjectiveByType(type, outLine, subClass, content,schoolId,chapterId);
|
|
|
|
|
List<ObjectiveQuestionWithBLOBs> list = objectiveQuestionMapper.getObjectiveByType(type, outLine, subClass, content, schoolId, chapterId);
|
|
|
|
|
PageInfo pageInfo = new PageInfo(list);
|
|
|
|
|
return new ResultEntity<PageInfo<ObjectiveQuestionWithBLOBs>>(pageInfo);
|
|
|
|
|
}
|
|
|
|
|