48 lines
1.5 KiB
XML
Raw Normal View History

2020-02-13 10:48:51 +08:00
<?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">
2020-02-13 10:48:51 +08:00
<resultMap type="org.dromara.system.domain.vo.SysDeptVo" id="SysDeptResult">
</resultMap>
2022-03-03 11:15:21 +08:00
<select id="selectDeptList" resultMap="SysDeptResult">
select
<if test="ew.getSqlSelect != null">
${ew.getSqlSelect}
</if>
<if test="ew.getSqlSelect == null">
*
</if>
from sys_dept ${ew.getCustomSqlSegment}
2021-05-08 23:35:39 +08:00
</select>
2024-11-07 14:29:35 +08:00
<select id="selectPageDeptList" resultMap="SysDeptResult">
select
<if test="ew.getSqlSelect != null">
${ew.getSqlSelect}
</if>
<if test="ew.getSqlSelect == null">
*
</if>
from sys_dept ${ew.getCustomSqlSegment}
</select>
<select id="countDeptById" resultType="Long">
select count(*) from sys_dept where del_flag = '0' and dept_id = #{deptId}
</select>
<select id="selectDeptListByRoleId" resultType="Long">
select d.dept_id
from sys_dept d
Merge branch 'master' of https://gitee.com/y_project/RuoYi-Vue into dev  Conflicts:  README.md  pom.xml  ruoyi-admin/pom.xml  ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysProfileController.java  ruoyi-admin/src/main/resources/application.yml  ruoyi-common/pom.xml  ruoyi-framework/pom.xml  ruoyi-generator/pom.xml  ruoyi-job/pom.xml  ruoyi-quartz/src/main/java/com/ruoyi/quartz/util/JobInvokeUtil.java  ruoyi-system/pom.xml  ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysDeptMapper.java  ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysMenuMapper.java  ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysPostMapper.java  ruoyi-system/src/main/java/com/ruoyi/system/service/ISysDeptService.java  ruoyi-system/src/main/java/com/ruoyi/system/service/ISysMenuService.java  ruoyi-system/src/main/java/com/ruoyi/system/service/ISysPostService.java  ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java  ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java  ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysPostServiceImpl.java  ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java  ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml  ruoyi-system/src/main/resources/mapper/system/SysMenuMapper.xml  ruoyi-system/src/main/resources/mapper/system/SysPostMapper.xml  ruoyi-ui/package.json  ruoyi-ui/src/directive/index.js  ruoyi-ui/src/plugins/download.js  ruoyi-ui/src/views/index.vue  ruoyi-ui/src/views/monitor/online/index.vue  ruoyi-ui/src/views/system/user/authRole.vue  ruoyi-ui/src/views/system/user/index.vue  ruoyi-ui/src/views/tool/gen/basicInfoForm.vue  ruoyi-ui/src/views/tool/gen/genInfoForm.vue
2021-12-13 12:37:36 +08:00
left join sys_role_dept rd on d.dept_id = rd.dept_id
2020-02-13 10:48:51 +08:00
where rd.role_id = #{roleId}
<if test="deptCheckStrictly">
and d.dept_id not in (select d.parent_id from sys_dept d inner join sys_role_dept rd on d.dept_id = rd.dept_id and rd.role_id = #{roleId})
</if>
order by d.parent_id, d.order_num
</select>
</mapper>