SysDeptMapper.java 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. package com.boman.system.mapper;
  2. import java.util.List;
  3. import org.apache.ibatis.annotations.Param;
  4. import com.boman.domain.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. * 查询部门全部数据,不带权限
  21. * @return
  22. */
  23. public List<SysDept> selectDeptsList();
  24. /**
  25. * 根据角色ID查询部门树信息
  26. *
  27. * @param id 角色ID
  28. * @param deptCheckStrictly 部门树选择项是否关联显示
  29. * @return 选中部门列表
  30. */
  31. public List<Integer> selectDeptListById(@Param("id") Long id, @Param("deptCheckStrictly") boolean deptCheckStrictly);
  32. public List<SysDept> validateHasChirld(@Param("depts") List<SysDept> depts);
  33. /**
  34. * 根据部门ID查询信息
  35. *
  36. * @param id 部门ID
  37. * @return 部门信息
  38. */
  39. public SysDept selectDeptById(Long id);
  40. /**
  41. * 根据部门名称查询信息
  42. * @param deptName
  43. * @return
  44. */
  45. public SysDept selectDeptByDeptName(String deptName);
  46. /**
  47. * 根据ID查询所有子部门
  48. *
  49. * @param id 部门ID
  50. * @return 部门列表
  51. */
  52. public List<SysDept> selectChildrenDeptById(Long id);
  53. List<SysDept> getByParentId(Long id);
  54. /**
  55. * 根据ID查询所有子部门(正常状态)
  56. *
  57. * @param id 部门ID
  58. * @return 子部门数
  59. */
  60. public int selectNormalChildrenDeptById(Long id);
  61. /**
  62. * 是否存在子节点
  63. *
  64. * @param id 部门ID
  65. * @return 结果
  66. */
  67. public int hasChildById(Long id);
  68. /**
  69. * 查询部门是否存在用户
  70. *
  71. * @param id 部门ID
  72. * @return 结果
  73. */
  74. public int checkDeptExistUser(Long id);
  75. /**
  76. * 校验部门名称是否唯一
  77. *
  78. * @param deptName 部门名称
  79. * @param parentId 父部门ID
  80. * @return 结果
  81. */
  82. public SysDept checkDeptNameUnique(@Param("deptName") String deptName, @Param("parentId") Long parentId);
  83. /**
  84. * 新增部门信息
  85. *
  86. * @param dept 部门信息
  87. * @return 结果
  88. */
  89. public int insertDept(SysDept dept);
  90. /**
  91. * 修改部门信息
  92. *
  93. * @param dept 部门信息
  94. * @return 结果
  95. */
  96. public int updateDept(SysDept dept);
  97. /**
  98. * 修改所在部门的父级部门状态
  99. *
  100. * @param dept 部门
  101. */
  102. public void updateDeptStatus(SysDept dept);
  103. /**
  104. * 修改子元素关系
  105. *
  106. * @param depts 子元素
  107. * @return 结果
  108. */
  109. public int updateDeptChildren(@Param("depts") List<SysDept> depts);
  110. /**
  111. * 删除部门管理信息
  112. *
  113. * @param id 部门ID
  114. * @return 结果
  115. */
  116. public int deleteDeptById(Long id);
  117. /**
  118. * 功能描述: 只找父亲,不招爷爷
  119. *
  120. * @param parentId parentId
  121. * @return com.boman.domain.SysDept
  122. */
  123. SysDept getParentById(Long parentId);
  124. }