wlzboy
2025-12-04 af8cab142a6b15c06e131a8474574dd5b00df982
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysDeptController.java
@@ -155,4 +155,18 @@
        deptService.checkDeptDataScope(deptId);
        return toAjax(deptService.deleteDeptById(deptId));
    }
    /**
     * 根据service_class查询部门信息
     */
    @GetMapping("/service-class/{serviceClass}")
    public AjaxResult getDeptByServiceClass(@PathVariable String serviceClass)
    {
        SysDept dept = deptService.selectDeptByServiceClass(serviceClass);
        if (dept != null) {
            return success(dept);
        } else {
            return error("未找到对应的部门信息");
        }
    }
}