You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
spring-boot-online-exam/backend/src/main/java/lsgwr/exam/service/ExamService.java

46 lines
2.1 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

/***********************************************************
* @Description : 考试接口
* @author : 梁山广(Laing Shan Guang)
* @date : 2019-05-28 08:05
* @email : liangshanguang2@gmail.com
***********************************************************/
package lsgwr.exam.service;// 定义了接口所属的包名
import lsgwr.exam.entity.Exam;// 导入了实体类Exam可能包含考试的基本信息
import lsgwr.exam.entity.ExamRecord;// 导入了实体类ExamRecord可能包含考试记录的详细信息
import lsgwr.exam.vo.*;// 导入了VO对象VO是值对象用于在不同层之间传递数据
import java.util.HashMap;// 导入了HashMap用于存储键值对
import java.util.List;// 导入了List用于存储一系列对象
// 定义了一个名为ExamService的接口
public interface ExamService {
// 获取所有的问题列表
List<QuestionVo> getQuestionAll();
// 根据传入的问题实体更新问题和选项
QuestionVo updateQuestion(QuestionVo questionVo);
// 创建问题
void questionCreate(QuestionCreateVo questionCreateVo);
// 获取问题的选项、分类和难度的下拉列表
QuestionSelectionVo getSelections();
// 根据问题ID获取问题详情
QuestionDetailVo getQuestionDetail(String id);
// 获取全部考试的列表
List<ExamVo> getExamAll();
// 获取所有问题的下拉列表,用于前端创建考试时筛选
ExamQuestionTypeVo getExamQuestionType();
// 根据前端组装的参数创建考试
Exam create(ExamCreateVo examCreateVo, String userId);
// 获取考试卡片列表
List<ExamCardVo> getExamCardList();
// 根据考试ID获取考试详情
ExamDetailVo getExamDetail(String id);
// 根据用户提交的作答信息进行判分
ExamRecord judge(String userId, String examId, HashMap<String, List<String>> answersMap);
// 根据用户ID获取此用户的所有考试信息
List<ExamRecordVo> getExamRecordList(String userId);
// 获取指定某次考试记录的详情
RecordDetailVo getRecordDetail(String recordId);
// 更新考试
Exam update(ExamVo examVo, String userId);
}