| | |
| | | where subject_id = #{subjectId} |
| | | </delete> |
| | | |
| | | </mapper> |
| | | <select id="getSubject" resultMap="BaseResultMap"> |
| | | select qs.*,s.name as subName |
| | | from t_question_subject qs |
| | | left join t_subject s on qs.subject_id = s.id |
| | | where subject_id = #{id} and qs.deleted = 0 and s.deleted = 0 |
| | | </select> |
| | | |
| | | <select id="countQuestionNum" resultType="integer"> |
| | | SELECT |
| | | count(distinct id) |
| | | FROM |
| | | t_question_subject |
| | | WHERE |
| | | subject_id IN <foreach collection="subjects" open="(" separator="," close=")" item="subjectId">#{subjectId}</foreach> |
| | | </select> |
| | | |
| | | </mapper> |