BAOLH
2026-11-10 4d730af0447c686133130d0116a0fa3dd82c2dca
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/system/repository/DeptRepository.java
@@ -35,6 +35,13 @@
     * @return /
     */
    List<Dept> findByPid(Long id);
    /**
     * 根据 ID 查询
     * @param id
     * @return /
     */
   List<Dept> findByIdIn(List<Long> ids);
    /**
     * 获取顶级部门
@@ -66,4 +73,7 @@
    @Modifying
    @Query(value = " update sys_dept set sub_count = ?1 where dept_id = ?2 ",nativeQuery = true)
    void updateSubCntById(Integer count, Long id);
    @Query(value = "select pid from sys_dept where dept_id = ?1",nativeQuery = true)
    Long findPidIdByDeptId(Long deptId);
}