提交修改

This commit is contained in:
daihh
2022-12-20 22:03:55 +08:00
parent 792bea4a38
commit 8087c0d64e
3 changed files with 20 additions and 2 deletions

View File

@@ -123,7 +123,7 @@ public class CourseExam extends BaseEntity {
private Boolean percentScore;
/**
* 试的id,使用已有试卷时保存选择试卷的id
* 试的id,使用已有试卷时保存选择试卷的id
*/
@Column(name = "paper_id",nullable=true,length=20)
private String paperId;

View File

@@ -131,6 +131,24 @@ public class ExamPaperApi extends ApiBaseController {
}
@GetMapping("/detail")
public JsonResponse<ExamPaper> detail(String id,Boolean content){
if(StringUtil.isBlank(id)){
return badRequest("缺少必要参数");
}
try {
ExamPaper query = examPaperService.query(id);
if(content==null || content==false) {
query.setPaperContent("");
}
return success(query);
} catch (Exception e) {
log.error("查询试卷失败",e);
return error("查询试卷失败",e.getMessage());
}
}
/**
*编辑详情
* */
@@ -168,7 +186,6 @@ public class ExamPaperApi extends ApiBaseController {
}
}
List<ExamQuestion> examQuestionList = examPaperService.batchForImport(vo);
return success(examQuestionList);
}

View File

@@ -95,5 +95,6 @@ public class ExamPaper extends BaseEntity {
}
public ExamPaper() {
}
}