xiangpei
2024-05-16 f1e20b08fcc05d78e3d25921494f92f5b9ca49cf
src/main/resources/mapper/QuestionMapper.xml
@@ -192,7 +192,7 @@
            <if test="level != null ">
                and q.grade_level= #{level}
            </if>
            <if test="subjectId != null ">
            <if test="subjectId != null and subjectId.length > 0">
                and qs.subject_id in
                <foreach item="subjectId" collection="subjectId" open="(" separator=","
                         close=")">
@@ -312,4 +312,25 @@
        order by a.create_time
    </select>
    <select id="selectContentById" resultType="com.mindskip.xzs.domain.vo.QuestionVO">
        SELECT
            tq.id,
            tq.question_type as questionType,
            tq.difficult,
            ttc.content as contentJson,
            tq.correct
        FROM
            t_question tq
            INNER JOIN t_text_content ttc ON tq.info_text_content_id = ttc.id AND tq.id = #{id}
    </select>
    <select id="getAnswer" resultType="com.mindskip.xzs.domain.vo.QuestionVO">
        SELECT
            tq.correct,
            ttc.content as contentJson
        FROM
            t_question tq
                INNER JOIN t_text_content ttc ON tq.info_text_content_id = ttc.id AND tq.id = #{id} AND tq.deleted = 0
    </select>
</mapper>