| | |
| | | DISTINCT |
| | | q.id, |
| | | q.question_type, |
| | | q.score, |
| | | q.difficult, |
| | | q.correct, |
| | | ttc.content |
| | | FROM |
| | |
| | | </where> |
| | | </select> |
| | | |
| | | <resultMap id="exportDataMap" type="com.mindskip.xzs.vo.QuestionExportData"> |
| | | <resultMap id="exportDataMap" type="com.mindskip.xzs.vo.QuestionImportVO"> |
| | | <result column="question_type" property="questionType"/> |
| | | <result column="title" property="title"/> |
| | | <result column="analyze" property="analyze"/> |
| | | <result column="content" property="content"/> |
| | | <result column="correct" property="answer"/> |
| | | <result column="content" property="questionContent"/> |
| | | <result column="correct" property="correct"/> |
| | | <result column="score" property="score"/> |
| | | <result column="difficult" property="difficult"/> |
| | | <collection property="subjectList" column="id" ofType="string" select="selectSubjects"/> |
| | | </resultMap> |
| | | |
| | |
| | | |
| | | <select id="countQuestionByTitle" resultType="integer"> |
| | | SELECT |
| | | COUNT(q.id) |
| | | DISTINCT q.id |
| | | FROM |
| | | t_question q |
| | | INNER JOIN t_text_content d on q.info_text_content_id = d.id |
| | | WHERE JSON_VALUE(d.content, '$.titleContent') = #{title} AND q.deleted = 0 |
| | | </select> |
| | | |
| | | <select id="countQuestionByTitleAndSubject" resultType="com.mindskip.xzs.vo.QuestionSubjectVO"> |
| | | SELECT |
| | | s.subject_id, s.question_id |
| | | FROM |
| | | t_question q |
| | | INNER JOIN t_text_content d on q.info_text_content_id = d.id |
| | | INNER JOIN t_question_subject s ON q.id = s.question_id |
| | | WHERE |
| | | JSON_VALUE(d.content, '$.titleContent') = #{title} AND s.subject_id = #{subjectId} AND q.deleted = 0 |
| | | </select> |
| | | |
| | | </mapper> |