|
|
@@ -10,8 +10,11 @@ import org.dromara.common.log.enums.BusinessType;
|
|
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
|
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
|
|
import org.dromara.common.web.core.BaseController;
|
|
|
+import cn.hutool.core.lang.tree.Tree;
|
|
|
+import org.dromara.system.domain.bo.SysDeptBo;
|
|
|
import org.dromara.system.domain.bo.SysPostBo;
|
|
|
import org.dromara.system.domain.vo.SysPostVo;
|
|
|
+import org.dromara.system.service.ISysDeptService;
|
|
|
import org.dromara.system.service.ISysPostService;
|
|
|
import jakarta.servlet.http.HttpServletResponse;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
@@ -33,6 +36,7 @@ import java.util.List;
|
|
|
public class SysPostController extends BaseController {
|
|
|
|
|
|
private final ISysPostService postService;
|
|
|
+ private final ISysDeptService deptService;
|
|
|
|
|
|
/**
|
|
|
* 获取岗位列表
|
|
|
@@ -130,4 +134,13 @@ public class SysPostController extends BaseController {
|
|
|
return R.ok(list);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 获取部门树列表
|
|
|
+ */
|
|
|
+ @SaCheckPermission("system:post:list")
|
|
|
+ @GetMapping("/deptTree")
|
|
|
+ public R<List<Tree<Long>>> deptTree(SysDeptBo dept) {
|
|
|
+ return R.ok(deptService.selectDeptTreeList(dept));
|
|
|
+ }
|
|
|
+
|
|
|
}
|