|
|
|
@ -60,8 +60,8 @@ public class ObjectiveApi {
|
|
|
|
|
*/
|
|
|
|
|
@AnonymousAccess
|
|
|
|
|
@ApiOperation("新增单个试题") //新增 题干不允许重复
|
|
|
|
|
@PostMapping("addTopic")
|
|
|
|
|
private Boolean addTopic(@RequestBody SysObjectiveQuestionsDto objectiveQuestion) {
|
|
|
|
|
@PostMapping("insertObjective")
|
|
|
|
|
private Boolean insertObjective(@RequestBody SysObjectiveQuestionsDto objectiveQuestion) {
|
|
|
|
|
if (StringUtils.isBlank(objectiveQuestion.getContent())) {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
@ -141,9 +141,9 @@ public class ObjectiveApi {
|
|
|
|
|
List<String> ids = new ArrayList<>();
|
|
|
|
|
for (SysObjectiveQuestions sysObjectiveQuestion : sysObjectiveQuestions) {
|
|
|
|
|
if (sysObjectiveQuestion.getSource().equals(schoolId)) {
|
|
|
|
|
continue;
|
|
|
|
|
} else {
|
|
|
|
|
ids.add(sysObjectiveQuestion.getObjectiveId());
|
|
|
|
|
} else {
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
try {
|
|
|
|
@ -162,16 +162,16 @@ public class ObjectiveApi {
|
|
|
|
|
*/
|
|
|
|
|
@AnonymousAccess
|
|
|
|
|
@ApiOperation("课程配置/题目条件查询")
|
|
|
|
|
@PostMapping("getTopicByConfig") //todo 关于老师删除的题库如何查询
|
|
|
|
|
private PageInfo<SysObjectiveQuestionsDto> getTopicByConfig(@RequestParam Integer index,
|
|
|
|
|
@PostMapping("selectObjectiveList") //todo 关于老师删除的题库如何查询
|
|
|
|
|
private PageInfo<SysObjectiveQuestionsDto> selectObjectiveList(@RequestParam Integer index,
|
|
|
|
|
@RequestParam Integer size,
|
|
|
|
|
@RequestParam(required = false) String courseId,
|
|
|
|
|
@RequestParam(required = false) String threeID,
|
|
|
|
|
@RequestParam(required = false) String chapterId,
|
|
|
|
|
@RequestParam(required = false) String type,
|
|
|
|
|
@RequestParam String schoolId,
|
|
|
|
|
@ApiParam("题干") @RequestParam(required = false) String content) {
|
|
|
|
|
PageHelper.startPage(index, size);
|
|
|
|
|
List<SysObjectiveQuestionsDto> list = sysObjectiveQuestionMapper.getTopicByConfig(null, courseId, threeID, type, schoolId, content);
|
|
|
|
|
List<SysObjectiveQuestionsDto> list = sysObjectiveQuestionMapper.getTopicByConfig(null, courseId, chapterId, type, schoolId, content);
|
|
|
|
|
PageInfo<SysObjectiveQuestionsDto> pageInfo = new PageInfo(list);
|
|
|
|
|
return (pageInfo);
|
|
|
|
|
}
|
|
|
|
@ -185,7 +185,7 @@ public class ObjectiveApi {
|
|
|
|
|
@AnonymousAccess
|
|
|
|
|
@ApiOperation("客观题单个详情查看")
|
|
|
|
|
@PostMapping("selectObjectiveDetails")
|
|
|
|
|
private SysObjectiveQuestions getById(@RequestParam String objectiveId) {
|
|
|
|
|
private SysObjectiveQuestions selectObjectiveDetails(@RequestParam String objectiveId) {
|
|
|
|
|
SysObjectiveQuestions sysObjectiveQuestions = sysObjectiveQuestionMapper.selectByPrimaryKey(objectiveId);
|
|
|
|
|
return sysObjectiveQuestions;
|
|
|
|
|
}
|
|
|
|
@ -196,7 +196,7 @@ public class ObjectiveApi {
|
|
|
|
|
* 参数:response
|
|
|
|
|
* return:void
|
|
|
|
|
*/
|
|
|
|
|
@GetMapping("downloadResource")
|
|
|
|
|
@PostMapping("downloadResource")
|
|
|
|
|
@ApiOperation("客观题导入模板下载")
|
|
|
|
|
@AnonymousAccess
|
|
|
|
|
public void downloadResource(HttpServletResponse response) {
|
|
|
|
@ -211,7 +211,7 @@ public class ObjectiveApi {
|
|
|
|
|
*/
|
|
|
|
|
@AnonymousAccess
|
|
|
|
|
@ApiOperation("本地excel导入试题")
|
|
|
|
|
@PostMapping("importTopicByLocal")
|
|
|
|
|
@PostMapping("insertObjectiveByExcel")
|
|
|
|
|
private Boolean importTopicByLocal(@RequestParam MultipartFile file,
|
|
|
|
|
@RequestParam String schoolId) throws IOException, InvalidFormatException {
|
|
|
|
|
if (file == null) {
|
|
|
|
|