From 0b077806196ceb8a68af93f00880ccc70aee50c2 Mon Sep 17 00:00:00 2001 From: 疯狂的狮子li <15040126243@163.com> Date: 星期四, 07 七月 2022 18:08:14 +0800 Subject: [PATCH] add 整合 springdoc 移除 knife4j --- ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysDeptController.java | 32 ++++++++++++++++---------------- 1 files changed, 16 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..e99e330 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,9 @@ 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 io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.tags.Tag; import lombok.RequiredArgsConstructor; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; @@ -28,7 +28,7 @@ * @author Lion Li */ @Validated -@Api(value = "閮ㄩ棬鎺у埗鍣�", tags = {"閮ㄩ棬绠$悊"}) +@Tag(name ="閮ㄩ棬鎺у埗鍣�", description = "閮ㄩ棬绠$悊") @RequiredArgsConstructor @RestController @RequestMapping("/system/dept") @@ -39,7 +39,7 @@ /** * 鑾峰彇閮ㄩ棬鍒楄〃 */ - @ApiOperation("鑾峰彇閮ㄩ棬鍒楄〃") + @Operation(summary = "鑾峰彇閮ㄩ棬鍒楄〃") @SaCheckPermission("system:dept:list") @GetMapping("/list") public R<List<SysDept>> list(SysDept dept) { @@ -50,10 +50,10 @@ /** * 鏌ヨ閮ㄩ棬鍒楄〃锛堟帓闄よ妭鐐癸級 */ - @ApiOperation("鏌ヨ閮ㄩ棬鍒楄〃锛堟帓闄よ妭鐐癸級") + @Operation(summary = "鏌ヨ閮ㄩ棬鍒楄〃锛堟帓闄よ妭鐐癸級") @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(@Parameter(name = "閮ㄩ棬ID") @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 + "")); @@ -63,10 +63,10 @@ /** * 鏍规嵁閮ㄩ棬缂栧彿鑾峰彇璇︾粏淇℃伅 */ - @ApiOperation("鏍规嵁閮ㄩ棬缂栧彿鑾峰彇璇︾粏淇℃伅") + @Operation(summary = "鏍规嵁閮ㄩ棬缂栧彿鑾峰彇璇︾粏淇℃伅") @SaCheckPermission("system:dept:query") @GetMapping(value = "/{deptId}") - public R<SysDept> getInfo(@ApiParam("閮ㄩ棬ID") @PathVariable Long deptId) { + public R<SysDept> getInfo(@Parameter(name = "閮ㄩ棬ID") @PathVariable Long deptId) { deptService.checkDeptDataScope(deptId); return R.ok(deptService.selectDeptById(deptId)); } @@ -74,7 +74,7 @@ /** * 鑾峰彇閮ㄩ棬涓嬫媺鏍戝垪琛� */ - @ApiOperation("鑾峰彇閮ㄩ棬涓嬫媺鏍戝垪琛�") + @Operation(summary = "鑾峰彇閮ㄩ棬涓嬫媺鏍戝垪琛�") @GetMapping("/treeselect") public R<List<Tree<Long>>> treeselect(SysDept dept) { List<SysDept> depts = deptService.selectDeptList(dept); @@ -84,9 +84,9 @@ /** * 鍔犺浇瀵瑰簲瑙掕壊閮ㄩ棬鍒楄〃鏍� */ - @ApiOperation("鍔犺浇瀵瑰簲瑙掕壊閮ㄩ棬鍒楄〃鏍�") + @Operation(summary = "鍔犺浇瀵瑰簲瑙掕壊閮ㄩ棬鍒楄〃鏍�") @GetMapping(value = "/roleDeptTreeselect/{roleId}") - public R<Map<String, Object>> roleDeptTreeselect(@ApiParam("瑙掕壊ID") @PathVariable("roleId") Long roleId) { + public R<Map<String, Object>> roleDeptTreeselect(@Parameter(name = "瑙掕壊ID") @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 +97,7 @@ /** * 鏂板閮ㄩ棬 */ - @ApiOperation("鏂板閮ㄩ棬") + @Operation(summary = "鏂板閮ㄩ棬") @SaCheckPermission("system:dept:add") @Log(title = "閮ㄩ棬绠$悊", businessType = BusinessType.INSERT) @PostMapping @@ -111,7 +111,7 @@ /** * 淇敼閮ㄩ棬 */ - @ApiOperation("淇敼閮ㄩ棬") + @Operation(summary = "淇敼閮ㄩ棬") @SaCheckPermission("system:dept:edit") @Log(title = "閮ㄩ棬绠$悊", businessType = BusinessType.UPDATE) @PutMapping @@ -132,11 +132,11 @@ /** * 鍒犻櫎閮ㄩ棬 */ - @ApiOperation("鍒犻櫎閮ㄩ棬") + @Operation(summary = "鍒犻櫎閮ㄩ棬") @SaCheckPermission("system:dept:remove") @Log(title = "閮ㄩ棬绠$悊", businessType = BusinessType.DELETE) @DeleteMapping("/{deptId}") - public R<Void> remove(@ApiParam("閮ㄩ棬ID涓�") @PathVariable Long deptId) { + public R<Void> remove(@Parameter(name = "閮ㄩ棬ID涓�") @PathVariable Long deptId) { if (deptService.hasChildByDeptId(deptId)) { return R.fail("瀛樺湪涓嬬骇閮ㄩ棬,涓嶅厑璁稿垹闄�"); } -- Gitblit v1.9.3