src/main/resources/mapper/SubjectDeptMapper.xml
@@ -25,4 +25,17 @@ WHERE tdq.subject_id = #{subjectId} </select> <select id="getByDeptId" resultType="com.mindskip.xzs.vo.SubjectVO"> SELECT s.id, s.name as subjectName FROM t_subject_dept sd INNER JOIN t_subject s ON sd.subject_id = s.id AND sd.dept_id = #{deptId} AND s.deleted = 0 </select> <delete id="deleteByDeptId"> DELETE FROM t_subject_dept WHERE dept_id = #{deptId} </delete> </mapper>