From 56050aa6501f3d9d2f79a2c40a28815878ac56ee Mon Sep 17 00:00:00 2001 From: 疯狂的狮子li <15040126243@163.com> Date: 星期四, 24 十一月 2022 15:14:47 +0800 Subject: [PATCH] update 同步 ruoyi 相关提交 * fix 修复Log注解GET请求记录不到参数问题 * fix 修复某些特性的环境生成代码变乱码TXT文件问题 * update 消除Vue3控制台出现的警告信息 * fix 开启TopNav没有子菜单隐藏侧边栏 * fix 修复回显数据字典数组异常问题(I60UYQ) * update 忽略不必要的属性数据返回 --- ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysMenuController.java | 27 +++++++++++---------------- 1 files changed, 11 insertions(+), 16 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysMenuController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysMenuController.java index 40c03d1..e80f0ee 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysMenuController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysMenuController.java @@ -10,9 +10,6 @@ import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.utils.StringUtils; import com.ruoyi.system.service.ISysMenuService; -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.*; @@ -27,7 +24,6 @@ * @author Lion Li */ @Validated -@Tag(name ="鑿滃崟淇℃伅鎺у埗鍣�", description = "鑿滃崟淇℃伅绠$悊") @RequiredArgsConstructor @RestController @RequestMapping("/system/menu") @@ -38,7 +34,6 @@ /** * 鑾峰彇鑿滃崟鍒楄〃 */ - @Operation(summary = "鑾峰彇鑿滃崟鍒楄〃") @SaCheckPermission("system:menu:list") @GetMapping("/list") public R<List<SysMenu>> list(SysMenu menu) { @@ -48,18 +43,18 @@ /** * 鏍规嵁鑿滃崟缂栧彿鑾峰彇璇︾粏淇℃伅 + * + * @param menuId 鑿滃崟ID */ - @Operation(summary = "鏍规嵁鑿滃崟缂栧彿鑾峰彇璇︾粏淇℃伅") @SaCheckPermission("system:menu:query") @GetMapping(value = "/{menuId}") - public R<SysMenu> getInfo(@Parameter(name = "鑿滃崟ID") @PathVariable Long menuId) { + public R<SysMenu> getInfo(@PathVariable Long menuId) { return R.ok(menuService.selectMenuById(menuId)); } /** * 鑾峰彇鑿滃崟涓嬫媺鏍戝垪琛� */ - @Operation(summary = "鑾峰彇鑿滃崟涓嬫媺鏍戝垪琛�") @GetMapping("/treeselect") public R<List<Tree<Long>>> treeselect(SysMenu menu) { List<SysMenu> menus = menuService.selectMenuList(menu, getUserId()); @@ -68,10 +63,11 @@ /** * 鍔犺浇瀵瑰簲瑙掕壊鑿滃崟鍒楄〃鏍� + * + * @param roleId 瑙掕壊ID */ - @Operation(summary = "鍔犺浇瀵瑰簲瑙掕壊鑿滃崟鍒楄〃鏍�") @GetMapping(value = "/roleMenuTreeselect/{roleId}") - public R<Map<String, Object>> roleMenuTreeselect(@Parameter(name = "瑙掕壊ID") @PathVariable("roleId") Long roleId) { + public R<Map<String, Object>> roleMenuTreeselect(@PathVariable("roleId") Long roleId) { List<SysMenu> menus = menuService.selectMenuList(getUserId()); Map<String, Object> ajax = new HashMap<>(); ajax.put("checkedKeys", menuService.selectMenuListByRoleId(roleId)); @@ -82,7 +78,6 @@ /** * 鏂板鑿滃崟 */ - @Operation(summary = "鏂板鑿滃崟") @SaCheckPermission("system:menu:add") @Log(title = "鑿滃崟绠$悊", businessType = BusinessType.INSERT) @PostMapping @@ -98,7 +93,6 @@ /** * 淇敼鑿滃崟 */ - @Operation(summary = "淇敼鑿滃崟") @SaCheckPermission("system:menu:edit") @Log(title = "鑿滃崟绠$悊", businessType = BusinessType.UPDATE) @PutMapping @@ -115,17 +109,18 @@ /** * 鍒犻櫎鑿滃崟 + * + * @param menuId 鑿滃崟ID */ - @Operation(summary = "鍒犻櫎鑿滃崟") @SaCheckPermission("system:menu:remove") @Log(title = "鑿滃崟绠$悊", businessType = BusinessType.DELETE) @DeleteMapping("/{menuId}") - public R<Void> remove(@Parameter(name = "鑿滃崟ID") @PathVariable("menuId") Long menuId) { + public R<Void> remove(@PathVariable("menuId") Long menuId) { if (menuService.hasChildByMenuId(menuId)) { - return R.fail("瀛樺湪瀛愯彍鍗�,涓嶅厑璁稿垹闄�"); + return R.warn("瀛樺湪瀛愯彍鍗�,涓嶅厑璁稿垹闄�"); } if (menuService.checkMenuExistRole(menuId)) { - return R.fail("鑿滃崟宸插垎閰�,涓嶅厑璁稿垹闄�"); + return R.warn("鑿滃崟宸插垎閰�,涓嶅厑璁稿垹闄�"); } return toAjax(menuService.deleteMenuById(menuId)); } -- Gitblit v1.9.3