From a0bcee3aa22b79f592c44cdb3dcdbd681490f265 Mon Sep 17 00:00:00 2001 From: liusheng <337615773@qq.com> Date: 星期一, 15 一月 2024 10:34:31 +0800 Subject: [PATCH] 代码提交 --- ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysDeptController.java | 18 ++++++++++++++---- 1 files changed, 14 insertions(+), 4 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..892587c 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; @@ -27,6 +30,7 @@ * * @author ruoyi */ +@Api(description = "閮ㄩ棬淇℃伅") @RestController @RequestMapping("/system/dept") public class SysDeptController extends BaseController @@ -37,6 +41,7 @@ /** * 鑾峰彇閮ㄩ棬鍒楄〃 */ + @ApiOperation("鑾峰彇閮ㄩ棬鍒楄〃") @PreAuthorize("@ss.hasPermi('system:dept:list')") @GetMapping("/list") public AjaxResult list(SysDept dept) @@ -48,6 +53,7 @@ /** * 鏌ヨ閮ㄩ棬鍒楄〃锛堟帓闄よ妭鐐癸級 */ + @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 @@ /** * 鏍规嵁閮ㄩ棬缂栧彿鑾峰彇璇︾粏淇℃伅 */ + @ApiOperation("鏍规嵁閮ㄩ棬缂栧彿鑾峰彇璇︾粏淇℃伅") @PreAuthorize("@ss.hasPermi('system:dept:query')") - @GetMapping(value = "/{deptId}") + @GetMapping(value = "/getInfo/{deptId}") public AjaxResult getInfo(@PathVariable Long deptId) { deptService.checkDeptDataScope(deptId); @@ -71,9 +78,10 @@ /** * 鏂板閮ㄩ棬 */ + @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 @@ /** * 淇敼閮ㄩ棬 */ + @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 @@ /** * 鍒犻櫎閮ㄩ棬 */ + @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