| | |
| | | <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=")"> |
| | |
| | | inner join t_subject c on b.subject_id = c.id and c.deleted = 0 |
| | | inner join t_text_content d on a.info_text_content_id = d.id |
| | | where a.deleted = 0 |
| | | AND JSON_VALUE(d.content, '$.titleContent') like concat('%', #{shortTitle}, '%') |
| | | group by a.id, question_type, a.create_time |
| | | HAVING GROUP_CONCAT(c.name) like concat('%', #{subjectName}, '%') |
| | | order by a.create_time |
| | |
| | | tq.id, |
| | | tq.question_type as questionType, |
| | | tq.difficult, |
| | | ttc.content as contentJson |
| | | 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="string"> |
| | | <select id="getAnswer" resultType="com.mindskip.xzs.domain.vo.QuestionVO"> |
| | | SELECT |
| | | ttc.content |
| | | 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 |