xiangpei
2024-07-09 9a7ee496344f044c89deddb70600b7e4d6017e1f
src/main/java/com/ycl/jxkg/service/impl/QuestionServiceImpl.java
@@ -5,15 +5,17 @@
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.ycl.jxkg.domain.entity.Question;
import com.ycl.jxkg.enums.QuestionTypeEnum;
import com.ycl.jxkg.enums.general.StatusEnum;
import com.ycl.jxkg.domain.other.KeyValue;
import com.ycl.jxkg.domain.question.QuestionItemObject;
import com.ycl.jxkg.domain.question.QuestionObject;
import com.ycl.jxkg.domain.vo.admin.exam.QuestionExportVO;
import com.ycl.jxkg.domain.vo.admin.exam.QuestionImportVO;
import com.ycl.jxkg.domain.vo.admin.question.QuestionEditItemVO;
import com.ycl.jxkg.domain.vo.admin.question.QuestionEditRequestVO;
import com.ycl.jxkg.domain.vo.admin.question.QuestionPageRequestVO;
import com.ycl.jxkg.domain.vo.admin.question.QuestionResponseVO;
import com.ycl.jxkg.enums.QuestionTypeEnum;
import com.ycl.jxkg.enums.general.StatusEnum;
import com.ycl.jxkg.mapper.QuestionMapper;
import com.ycl.jxkg.service.QuestionService;
import com.ycl.jxkg.utils.DateTimeUtil;
@@ -105,6 +107,7 @@
        switch (questionTypeEnum) {
            case SingleChoice:
            case TrueFalse:
            case Audio:
                questionEditRequestVO.setCorrect(question.getCorrect());
                break;
            case MultipleChoice:
@@ -115,6 +118,8 @@
                questionEditRequestVO.setCorrectArray(correctContent);
                break;
            case ShortAnswer:
            case Calculate:
            case Analysis:
                questionEditRequestVO.setCorrect(questionObject.getCorrect());
                break;
            default:
@@ -176,4 +181,9 @@
                .update();
    }
    @Override
    public List<QuestionImportVO> export(QuestionExportVO query) {
        return questionMapper.export(query);
    }
}