| | |
| | | </foreach> |
| | | </select> |
| | | |
| | | <select id="selectQuestion" resultType="com.mindskip.xzs.viewmodel.student.question.answer.QuestionPageStudentResponseVM"> |
| | | select a.id, |
| | | a.question_type, |
| | | JSON_VALUE(d.content, '$.titleContent') as shortTitle, |
| | | GROUP_CONCAT(c.name) as subjectName |
| | | from t_question a |
| | | inner join t_question_subject b on a.id = b.question_id and b.deleted = 0 |
| | | 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 |
| | | group by a.id, question_type, a.create_time |
| | | HAVING GROUP_CONCAT(c.name) like concat('%', #{subjectName}, '%') |
| | | order by a.create_time |
| | | </select> |
| | | |
| | | </mapper> |