xiangpei
2024-07-08 d69a9a79a82c8a2f93efcd2b43b0a03ca57a031c
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>