buzhanyi 2 роки тому
батько
коміт
492c8bb7d1

+ 12 - 0
hazard-admin/src/main/java/com/ozs/web/controller/system/SysDeptController.java

@@ -1,6 +1,8 @@
 package com.ozs.web.controller.system;
 
 import java.util.List;
+
+import io.swagger.annotations.ApiOperation;
 import org.apache.commons.lang3.ArrayUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
@@ -45,6 +47,16 @@ public class SysDeptController extends BaseController
         return success(depts);
     }
 
+    /**
+     * 获取部门树列表
+     */
+    @GetMapping("/deptTree")
+    @ApiOperation("获取部门树列表")
+    public AjaxResult deptTree(SysDept dept)
+    {
+        return success(deptService.selectDeptTreeList(dept));
+    }
+
     /**
      * 查询部门列表(排除节点)
      */