| | |
| | | package com.project.admin.controller.system; |
| | | |
| | | import java.util.List; |
| | | import org.apache.commons.lang3.ArrayUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.PutMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import com.project.common.annotation.Log; |
| | | import com.project.common.constant.UserConstants; |
| | | import com.project.common.core.controller.BaseController; |
| | |
| | | import com.project.common.enums.BusinessType; |
| | | import com.project.common.utils.StringUtils; |
| | | import com.project.system.service.ISysDeptService; |
| | | import org.apache.commons.lang3.ArrayUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 部门信息 |
| | | * |
| | | * |
| | | * @author project |
| | | */ |
| | | @RestController |
| | |
| | | /** |
| | | * 获取部门列表 |
| | | */ |
| | | @GetMapping("/allList") |
| | | public AjaxResult allList(@RequestParam("parentId") Long parentId) |
| | | { |
| | | List<SysDept> depts = deptService.list(deptService.lq().eq(SysDept::getParentId, parentId)); |
| | | return success(depts); |
| | | } |
| | | |
| | | /** |
| | | * 获取部门列表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:dept:list')") |
| | | @GetMapping("/list") |
| | | public AjaxResult list(SysDept dept) |