ZQN
2024-07-23 51ad03fcc8ffdb52469216558031a1bd31ed1fa6
project-admin/src/main/java/com/project/admin/controller/system/SysDeptController.java
@@ -1,18 +1,5 @@
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;
@@ -21,10 +8,17 @@
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
@@ -37,6 +31,16 @@
    /**
     * 获取部门列表
     */
    @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)