SysDeptMapper.java 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. package com.ruoyi.system.mapper;
  2. import java.util.List;
  3. import org.apache.ibatis.annotations.Param;
  4. import com.ruoyi.common.core.domain.entity.SysDept;
  5. /**
  6. * 部门管理 数据层
  7. *
  8. * @author ruoyi
  9. */
  10. public interface SysDeptMapper
  11. {
  12. /**
  13. * 查询部门管理数据
  14. *
  15. * @param dept 部门信息
  16. * @return 部门信息集合
  17. */
  18. public List<SysDept> selectDeptList(SysDept dept);
  19. /**
  20. * 根据角色ID查询部门树信息
  21. *
  22. * @param roleId 角色ID
  23. * @param deptCheckStrictly 部门树选择项是否关联显示
  24. * @return 选中部门列表
  25. */
  26. public List<Long> selectDeptListByRoleId(@Param("roleId") Long roleId, @Param("deptCheckStrictly") boolean deptCheckStrictly);
  27. /**
  28. * 根据部门ID查询信息
  29. *
  30. * @param deptId 部门ID
  31. * @return 部门信息
  32. */
  33. public SysDept selectDeptById(Long deptId);
  34. /**
  35. * 根据ID查询所有子部门
  36. *
  37. * @param deptId 部门ID
  38. * @return 部门列表
  39. */
  40. public List<SysDept> selectChildrenDeptById(Long deptId);
  41. /**
  42. * 根据ID查询所有子部门(正常状态)
  43. *
  44. * @param deptId 部门ID
  45. * @return 子部门数
  46. */
  47. public int selectNormalChildrenDeptById(Long deptId);
  48. /**
  49. * 是否存在子节点
  50. *
  51. * @param deptId 部门ID
  52. * @return 结果
  53. */
  54. public int hasChildByDeptId(Long deptId);
  55. /**
  56. * 查询部门是否存在用户
  57. *
  58. * @param deptId 部门ID
  59. * @return 结果
  60. */
  61. public int checkDeptExistUser(Long deptId);
  62. /**
  63. * 校验部门名称是否唯一
  64. *
  65. * @param deptName 部门名称
  66. * @param parentId 父部门ID
  67. * @return 结果
  68. */
  69. public SysDept checkDeptNameUnique(@Param("deptName") String deptName, @Param("parentId") Long parentId);
  70. /**
  71. * 新增部门信息
  72. *
  73. * @param dept 部门信息
  74. * @return 结果
  75. */
  76. public int insertDept(SysDept dept);
  77. /**
  78. * 修改部门信息
  79. *
  80. * @param dept 部门信息
  81. * @return 结果
  82. */
  83. public int updateDept(SysDept dept);
  84. /**
  85. * 修改所在部门正常状态
  86. *
  87. * @param deptIds 部门ID组
  88. */
  89. public void updateDeptStatusNormal(Long[] deptIds);
  90. /**
  91. * 修改子元素关系
  92. *
  93. * @param depts 子元素
  94. * @return 结果
  95. */
  96. public int updateDeptChildren(@Param("depts") List<SysDept> depts);
  97. /**
  98. * 删除部门管理信息
  99. *
  100. * @param deptId 部门ID
  101. * @return 结果
  102. */
  103. public int deleteDeptById(Long deptId);
  104. }