xiangpei
2024-07-08 c447386e06ce5927fb6e3ccb22ee673535b3f566
src/main/resources/mapper/QuestionMapper.xml
@@ -273,7 +273,7 @@
        DISTINCT
        q.id,
        q.question_type,
        q.correct as answer,
        q.correct,
        ttc.content
        FROM
        t_question q
@@ -373,4 +373,13 @@
                 INNER JOIN t_text_content ttc ON tq.info_text_content_id = ttc.id AND tq.id = #{id} AND tq.deleted = 0
    </select>
    <select id="countQuestionByTitle" resultType="integer">
        SELECT
               COUNT(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>
</mapper>