From ecc4aa55714c96ca7c906cd461a464d1f00cb47f Mon Sep 17 00:00:00 2001 From: liyang <liyang1987jay@163.com> Date: 星期二, 12 七月 2022 21:00:55 +0800 Subject: [PATCH] 修改方法描述 --- ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysDeptController.java | 28 ++++++++++++---------------- 1 files changed, 12 insertions(+), 16 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 475cdb7..2980e64 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 @@ -11,9 +11,6 @@ import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.utils.StringUtils; import com.ruoyi.system.service.ISysDeptService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import io.swagger.annotations.ApiParam; import lombok.RequiredArgsConstructor; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; @@ -28,7 +25,6 @@ * @author Lion Li */ @Validated -@Api(value = "閮ㄩ棬鎺у埗鍣�", tags = {"閮ㄩ棬绠$悊"}) @RequiredArgsConstructor @RestController @RequestMapping("/system/dept") @@ -39,7 +35,6 @@ /** * 鑾峰彇閮ㄩ棬鍒楄〃 */ - @ApiOperation("鑾峰彇閮ㄩ棬鍒楄〃") @SaCheckPermission("system:dept:list") @GetMapping("/list") public R<List<SysDept>> list(SysDept dept) { @@ -49,11 +44,12 @@ /** * 鏌ヨ閮ㄩ棬鍒楄〃锛堟帓闄よ妭鐐癸級 + * + * @param deptId 閮ㄩ棬ID */ - @ApiOperation("鏌ヨ閮ㄩ棬鍒楄〃锛堟帓闄よ妭鐐癸級") @SaCheckPermission("system:dept:list") @GetMapping("/list/exclude/{deptId}") - public R<List<SysDept>> excludeChild(@ApiParam("閮ㄩ棬ID") @PathVariable(value = "deptId", required = false) Long deptId) { + public R<List<SysDept>> excludeChild(@PathVariable(value = "deptId", required = false) Long deptId) { List<SysDept> depts = deptService.selectDeptList(new SysDept()); depts.removeIf(d -> d.getDeptId().equals(deptId) || ArrayUtil.contains(StringUtils.split(d.getAncestors(), ","), deptId + "")); @@ -62,11 +58,12 @@ /** * 鏍规嵁閮ㄩ棬缂栧彿鑾峰彇璇︾粏淇℃伅 + * + * @param deptId 閮ㄩ棬ID */ - @ApiOperation("鏍规嵁閮ㄩ棬缂栧彿鑾峰彇璇︾粏淇℃伅") @SaCheckPermission("system:dept:query") @GetMapping(value = "/{deptId}") - public R<SysDept> getInfo(@ApiParam("閮ㄩ棬ID") @PathVariable Long deptId) { + public R<SysDept> getInfo(@PathVariable Long deptId) { deptService.checkDeptDataScope(deptId); return R.ok(deptService.selectDeptById(deptId)); } @@ -74,7 +71,6 @@ /** * 鑾峰彇閮ㄩ棬涓嬫媺鏍戝垪琛� */ - @ApiOperation("鑾峰彇閮ㄩ棬涓嬫媺鏍戝垪琛�") @GetMapping("/treeselect") public R<List<Tree<Long>>> treeselect(SysDept dept) { List<SysDept> depts = deptService.selectDeptList(dept); @@ -83,10 +79,11 @@ /** * 鍔犺浇瀵瑰簲瑙掕壊閮ㄩ棬鍒楄〃鏍� + * + * @param roleId 瑙掕壊ID */ - @ApiOperation("鍔犺浇瀵瑰簲瑙掕壊閮ㄩ棬鍒楄〃鏍�") @GetMapping(value = "/roleDeptTreeselect/{roleId}") - public R<Map<String, Object>> roleDeptTreeselect(@ApiParam("瑙掕壊ID") @PathVariable("roleId") Long roleId) { + public R<Map<String, Object>> roleDeptTreeselect(@PathVariable("roleId") Long roleId) { List<SysDept> depts = deptService.selectDeptList(new SysDept()); Map<String, Object> ajax = new HashMap<>(); ajax.put("checkedKeys", deptService.selectDeptListByRoleId(roleId)); @@ -97,7 +94,6 @@ /** * 鏂板閮ㄩ棬 */ - @ApiOperation("鏂板閮ㄩ棬") @SaCheckPermission("system:dept:add") @Log(title = "閮ㄩ棬绠$悊", businessType = BusinessType.INSERT) @PostMapping @@ -111,7 +107,6 @@ /** * 淇敼閮ㄩ棬 */ - @ApiOperation("淇敼閮ㄩ棬") @SaCheckPermission("system:dept:edit") @Log(title = "閮ㄩ棬绠$悊", businessType = BusinessType.UPDATE) @PutMapping @@ -131,12 +126,13 @@ /** * 鍒犻櫎閮ㄩ棬 + * + * @param deptId 閮ㄩ棬ID */ - @ApiOperation("鍒犻櫎閮ㄩ棬") @SaCheckPermission("system:dept:remove") @Log(title = "閮ㄩ棬绠$悊", businessType = BusinessType.DELETE) @DeleteMapping("/{deptId}") - public R<Void> remove(@ApiParam("閮ㄩ棬ID涓�") @PathVariable Long deptId) { + public R<Void> remove(@PathVariable Long deptId) { if (deptService.hasChildByDeptId(deptId)) { return R.fail("瀛樺湪涓嬬骇閮ㄩ棬,涓嶅厑璁稿垹闄�"); } -- Gitblit v1.9.3