mirror of
https://github.com/ccmjga/zhilu-admin
synced 2026-03-21 01:43:45 +08:00
新增部门子级查询功能,更新相关API接口和前端组件,优化部门树形结构展示,支持父子部门关系的处理
This commit is contained in:
@@ -4,6 +4,7 @@ import com.zl.mjga.dto.PageRequestDto;
|
||||
import com.zl.mjga.dto.PageResponseDto;
|
||||
import com.zl.mjga.dto.department.DepartmentQueryDto;
|
||||
import com.zl.mjga.dto.department.DepartmentRespDto;
|
||||
import com.zl.mjga.dto.department.DepartmentWithParentDto;
|
||||
import com.zl.mjga.repository.DepartmentRepository;
|
||||
import com.zl.mjga.service.DepartmentService;
|
||||
import java.util.List;
|
||||
@@ -37,6 +38,12 @@ public class DepartmentController {
|
||||
return departmentService.queryAvailableParentDepartmentsBy(id);
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority(T(com.zl.mjga.model.urp.EPermission).READ_DEPARTMENT_PERMISSION)")
|
||||
@GetMapping("/query-sub")
|
||||
List<DepartmentWithParentDto> querySubDepartment(@RequestParam(required = false) Long id) {
|
||||
return departmentService.queryDepartmentAndSubsBy(id);
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority(T(com.zl.mjga.model.urp.EPermission).WRITE_DEPARTMENT_PERMISSION)")
|
||||
@DeleteMapping()
|
||||
void deleteDepartment(@RequestParam Long id) {
|
||||
|
||||
Reference in New Issue
Block a user