From 10aaa035f5be0312304d20f022bdb714a8f4900a Mon Sep 17 00:00:00 2001
From: liusheng <337615773@qq.com>
Date: 星期三, 11 十二月 2024 22:16:23 +0800
Subject: [PATCH] 代码提交
---
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysDeptController.java | 32 +++++++++++++++++++++-----------
1 files changed, 21 insertions(+), 11 deletions(-)
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysDeptController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysDeptController.java
index a320da7..5bfc05a 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysDeptController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysDeptController.java
@@ -1,6 +1,9 @@
package com.ruoyi.web.controller.system;
import java.util.List;
+
+import io.swagger.annotations.Api;
+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;
@@ -24,9 +27,10 @@
/**
* 閮ㄩ棬淇℃伅
- *
+ *
* @author ruoyi
*/
+@Api(description = "閮ㄩ棬淇℃伅")
@RestController
@RequestMapping("/system/dept")
public class SysDeptController extends BaseController
@@ -37,7 +41,8 @@
/**
* 鑾峰彇閮ㄩ棬鍒楄〃
*/
- @PreAuthorize("@ss.hasPermi('system:dept:list')")
+ @ApiOperation("鑾峰彇閮ㄩ棬鍒楄〃")
+ //@PreAuthorize("@ss.hasPermi('system:dept:list')")
@GetMapping("/list")
public AjaxResult list(SysDept dept)
{
@@ -48,7 +53,8 @@
/**
* 鏌ヨ閮ㄩ棬鍒楄〃锛堟帓闄よ妭鐐癸級
*/
- @PreAuthorize("@ss.hasPermi('system:dept:list')")
+ @ApiOperation("鏌ヨ閮ㄩ棬鍒楄〃锛堟帓闄よ妭鐐癸級")
+ //@PreAuthorize("@ss.hasPermi('system:dept:list')")
@GetMapping("/list/exclude/{deptId}")
public AjaxResult excludeChild(@PathVariable(value = "deptId", required = false) Long deptId)
{
@@ -60,8 +66,9 @@
/**
* 鏍规嵁閮ㄩ棬缂栧彿鑾峰彇璇︾粏淇℃伅
*/
- @PreAuthorize("@ss.hasPermi('system:dept:query')")
- @GetMapping(value = "/{deptId}")
+ @ApiOperation("鏍规嵁閮ㄩ棬缂栧彿鑾峰彇璇︾粏淇℃伅")
+ //@PreAuthorize("@ss.hasPermi('system:dept:query')")
+ @GetMapping("/getInfo/{deptId}")
public AjaxResult getInfo(@PathVariable Long deptId)
{
deptService.checkDeptDataScope(deptId);
@@ -71,9 +78,10 @@
/**
* 鏂板閮ㄩ棬
*/
- @PreAuthorize("@ss.hasPermi('system:dept:add')")
+ @ApiOperation("鏂板閮ㄩ棬")
+ //@PreAuthorize("@ss.hasPermi('system:dept:add')")
@Log(title = "閮ㄩ棬绠$悊", businessType = BusinessType.INSERT)
- @PostMapping
+ @PostMapping("/add")
public AjaxResult add(@Validated @RequestBody SysDept dept)
{
if (UserConstants.NOT_UNIQUE.equals(deptService.checkDeptNameUnique(dept)))
@@ -87,9 +95,10 @@
/**
* 淇敼閮ㄩ棬
*/
- @PreAuthorize("@ss.hasPermi('system:dept:edit')")
+ @ApiOperation("淇敼閮ㄩ棬")
+ //@PreAuthorize("@ss.hasPermi('system:dept:edit')")
@Log(title = "閮ㄩ棬绠$悊", businessType = BusinessType.UPDATE)
- @PutMapping
+ @PostMapping("/edit")
public AjaxResult edit(@Validated @RequestBody SysDept dept)
{
Long deptId = dept.getDeptId();
@@ -113,9 +122,10 @@
/**
* 鍒犻櫎閮ㄩ棬
*/
- @PreAuthorize("@ss.hasPermi('system:dept:remove')")
+ @ApiOperation("鍒犻櫎閮ㄩ棬")
+ //@PreAuthorize("@ss.hasPermi('system:dept:remove')")
@Log(title = "閮ㄩ棬绠$悊", businessType = BusinessType.DELETE)
- @DeleteMapping("/{deptId}")
+ @GetMapping("/remove/{deptId}")
public AjaxResult remove(@PathVariable Long deptId)
{
if (deptService.hasChildByDeptId(deptId))
--
Gitblit v1.9.3