You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
<?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="org.dromara.system.mapper.SysDeptMapper">
|
|
|
|
|
<select id="selectDeptByRoleId" parameterType="Long" resultType="org.dromara.system.domain.vo.SysDeptVo">
|
|
|
|
|
select * from sys_dept d
|
|
|
|
|
inner join sys_role_dept rd on d.dept_id = rd.dept_id
|
|
|
|
|
where d.del_flag = '0' and rd.role_id = #{roleId}
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="selectDeptById" parameterType="string" resultType="org.dromara.system.domain.vo.SysDeptVo">
|
|
|
|
|
select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone, d.email, d.status,d.dept_type,d.creditcode,d.zone, d.zzDisplayPath,
|
|
|
|
|
(select dept_name from sys_dept where dept_id = d.parent_id) parent_name
|
|
|
|
|
from sys_dept d
|
|
|
|
|
where d.dept_id = #{deptId}
|
|
|
|
|
</select>
|
|
|
|
|
</mapper>
|