<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.xjrsoft.module.system.mapper.XjrMenuDeptRelationMapper">
    <select id="getPage" resultType="com.xjrsoft.module.system.vo.XjrMenuDeptRelationPageVo">
        SELECT *, t1.name as menuName, t2.name as deptName FROM xjr_menu_dept_relation t
        LEFT JOIN xjr_menu t1 ON t1.id = t.menu_id
        LEFT JOIN xjr_department t2 on t2.id = t.dept_id
        WHERE t.delete_mark = 0
        <if test="list != null and list.size() > 0">
            AND dept_id IN
            <foreach item="deptId" index="index" collection="list" open="(" separator="," close=")">
                #{deptId}
            </foreach>
        </if>
    </select>
</mapper>