ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
## 一、获取组织树形数据 1、业务代码中,注入DepartmentTreeService; 2、业务代码中,调用tree()获取数据; 示例代码: ``` @Autowired private SharedDepartmentTreeService departmentTreeService; ``` ``` model.setTreeobject(departmentTreeService.tree()); ``` ## 二、获取树形字典数据 1、业务代码中,注入SysTreeDataService; 2、业务代码中,调用tree(treeCode); 这里需要传入treeCode,指定展示那棵树(后台定义); 示例代码: ``` @Autowired private SharedSysTreeDataService sharedSysTreeDataService; ``` ``` model.setTreeobject(sysTreeDataService.tree(“TREE_1001”)); ```