添加校验部门包含未停用的子部门

This commit is contained in:
RuoYi
2020-05-07 12:15:04 +08:00
parent 2c8365b605
commit 8a9d298ffc
6 changed files with 42 additions and 2 deletions

View File

@ -101,8 +101,17 @@ public interface SysDeptMapper
/**
* 根据ID查询所有子部门
*
* @param deptId 部门ID
* @return 部门列表
*/
public List<SysDept> selectChildrenDeptById(Long deptId);
/**
* 根据ID查询所有子部门正常状态
*
* @param deptId 部门ID
* @return 子部门数
*/
public int selectNormalChildrenDeptById(Long deptId);
}

View File

@ -84,6 +84,14 @@ public interface ISysDeptService
*/
public SysDept selectDeptById(Long deptId);
/**
* 根据ID查询所有子部门正常状态
*
* @param deptId 部门ID
* @return 子部门数
*/
public int selectNormalChildrenDeptById(Long deptId);
/**
* 校验部门名称是否唯一
*

View File

@ -251,6 +251,17 @@ public class SysDeptServiceImpl implements ISysDeptService
return deptMapper.selectDeptById(deptId);
}
/**
* 根据ID查询所有子部门正常状态
*
* @param deptId 部门ID
* @return 子部门数
*/
public int selectNormalChildrenDeptById(Long deptId)
{
return deptMapper.selectNormalChildrenDeptById(deptId);
}
/**
* 校验部门名称是否唯一
*