11 changed files with 189 additions and 4 deletions
@ -0,0 +1,38 @@ |
|||
package com.elink.esua.epdc.dto; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 部门节点 |
|||
* |
|||
* @author wangtong |
|||
* @date 2022/8/29 11:01 |
|||
*/ |
|||
@Data |
|||
public class SysDeptResultDTO { |
|||
|
|||
/** |
|||
* 部门id |
|||
*/ |
|||
private String value; |
|||
|
|||
/** |
|||
* 部门名称 |
|||
*/ |
|||
private String label; |
|||
|
|||
/** |
|||
* 上级id |
|||
*/ |
|||
private String pid; |
|||
|
|||
/** |
|||
* 排序 |
|||
*/ |
|||
private int sort; |
|||
|
|||
private List<SysDeptResultDTO> children = new ArrayList<>(); |
|||
} |
@ -0,0 +1,39 @@ |
|||
package com.elink.esua.epdc.controller; |
|||
|
|||
import com.elink.esua.epdc.commons.tools.utils.Result; |
|||
import com.elink.esua.epdc.dto.SysDeptResultDTO; |
|||
import com.elink.esua.epdc.service.AdminService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.GetMapping; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 管理端对外接口 |
|||
* |
|||
* @author yujintao |
|||
* @email yujintao@elink-cn.com |
|||
* @date 2019/9/11 9:25 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("sys/admin") |
|||
public class ApiSysAdminController { |
|||
|
|||
@Autowired |
|||
private AdminService adminService; |
|||
|
|||
/** |
|||
* @describe: 获取所有部门的树状列表 街道-社区-网格 |
|||
* @author wangtong |
|||
* @date 2022/8/29 11:01 |
|||
* @params [gridId] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.lang.String> |
|||
*/ |
|||
@GetMapping("getAllDeptTree") |
|||
public Result<List<SysDeptResultDTO>> getAllDeptTree() { |
|||
return adminService.getAllDeptTree(); |
|||
} |
|||
|
|||
} |
Loading…
Reference in new issue