|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
|
|
|
|
<mapper namespace="com.msdw.tms.dao.QuestionsDao">
|
|
|
|
|
|
|
|
<!-- 可根据自己的需求,是否要使用 -->
|
|
|
|
<resultMap type="com.msdw.tms.entity.QuestionsEntity" id="questionsMap">
|
|
|
|
<result property="id" column="id"/>
|
|
|
|
<result property="questionType" column="question_type"/>
|
|
|
|
<result property="questionStem" column="question_stem"/>
|
|
|
|
<result property="optionA" column="option_a"/>
|
|
|
|
<result property="optionB" column="option_b"/>
|
|
|
|
<result property="optionC" column="option_c"/>
|
|
|
|
<result property="optionD" column="option_d"/>
|
|
|
|
<result property="optionE" column="option_e"/>
|
|
|
|
<result property="optionF" column="option_f"/>
|
|
|
|
<result property="answer" column="answer"/>
|
|
|
|
<result property="answerAnalysis" column="answer_analysis"/>
|
|
|
|
<result property="isEnable" column="is_enable"/>
|
|
|
|
<result property="isDel" column="is_del"/>
|
|
|
|
<result property="createUser" column="create_user"/>
|
|
|
|
<result property="createTime" column="create_time"/>
|
|
|
|
<result property="modifyUser" column="modify_user"/>
|
|
|
|
<result property="modifyTime" column="modify_time"/>
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
<select id="selectIds" parameterType="int" resultType="int">
|
|
|
|
SELECT
|
|
|
|
id
|
|
|
|
FROM
|
|
|
|
tms_questions
|
|
|
|
WHERE
|
|
|
|
is_del = 0
|
|
|
|
AND
|
|
|
|
is_enable = 1
|
|
|
|
<if test="questionType != null and questionType != ''">
|
|
|
|
and question_type = #{questionType}
|
|
|
|
</if>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
<!--2020.09.28-->
|
|
|
|
<select id="countTotalMultipleNum" resultType="int">
|
|
|
|
SELECT COUNT( 1 ) FROM tms_questions WHERE is_del = 0 AND is_enable = 1 AND question_type = 2
|
|
|
|
</select>
|
|
|
|
<select id="countTotalJudgmentNum" resultType="int">
|
|
|
|
SELECT COUNT( 1 ) FROM tms_questions WHERE is_del = 0 AND is_enable = 1 AND question_type = 3
|
|
|
|
</select>
|
|
|
|
|
|
|
|
</mapper>
|