From 764d883b5ea3bdc06abbec548b6df0511e567978 Mon Sep 17 00:00:00 2001
From: linwe <872216996@qq.com>
Date: Tue, 03 Sep 2024 09:46:05 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/binlog' into binlog
---
src/main/java/org/springblade/modules/system/controller/MenuController.java | 25 ++++++++++++++-----------
1 files changed, 14 insertions(+), 11 deletions(-)
diff --git a/src/main/java/org/springblade/modules/system/controller/MenuController.java b/src/main/java/org/springblade/modules/system/controller/MenuController.java
index 7b0451b..13b85a8 100644
--- a/src/main/java/org/springblade/modules/system/controller/MenuController.java
+++ b/src/main/java/org/springblade/modules/system/controller/MenuController.java
@@ -72,7 +72,7 @@
* 详情
*/
@GetMapping("/detail")
- @PreAuth(RoleConstant.HAS_ROLE_ADMINISTRATOR)
+// @PreAuth(RoleConstant.HAS_ROLE_ADMINISTRATOR)
@ApiOperationSupport(order = 1)
@ApiOperation(value = "详情", notes = "传入menu")
public R<MenuVO> detail(Menu menu) {
@@ -93,7 +93,7 @@
@ApiImplicitParam(name = "code", value = "菜单编号", paramType = "query", dataType = "string"),
@ApiImplicitParam(name = "name", value = "菜单名称", paramType = "query", dataType = "string")
})
- @PreAuth(RoleConstant.HAS_ROLE_ADMINISTRATOR)
+// @PreAuth(RoleConstant.HAS_ROLE_ADMINISTRATOR)
@ApiOperationSupport(order = 2)
@ApiOperation(value = "列表", notes = "传入menu")
public R<List<MenuVO>> list(@ApiIgnore @RequestParam Map<String, Object> menu) {
@@ -109,7 +109,7 @@
@ApiImplicitParam(name = "code", value = "菜单编号", paramType = "query", dataType = "string"),
@ApiImplicitParam(name = "name", value = "菜单名称", paramType = "query", dataType = "string")
})
- @PreAuth(RoleConstant.HAS_ROLE_ADMINISTRATOR)
+// @PreAuth(RoleConstant.HAS_ROLE_ADMINISTRATOR)
@ApiOperationSupport(order = 3)
@ApiOperation(value = "懒加载列表", notes = "传入menu")
public R<List<MenuVO>> lazyList(Long parentId, @ApiIgnore @RequestParam Map<String, Object> menu) {
@@ -125,11 +125,11 @@
@ApiImplicitParam(name = "code", value = "菜单编号", paramType = "query", dataType = "string"),
@ApiImplicitParam(name = "name", value = "菜单名称", paramType = "query", dataType = "string")
})
- @PreAuth(RoleConstant.HAS_ROLE_ADMINISTRATOR)
+// @PreAuth(RoleConstant.HAS_ROLE_ADMINISTRATOR)
@ApiOperationSupport(order = 4)
@ApiOperation(value = "菜单列表", notes = "传入menu")
- public R<List<MenuVO>> menuList(@ApiIgnore @RequestParam Map<String, Object> menu) {
- List<Menu> list = menuService.list(Condition.getQueryWrapper(menu, Menu.class).lambda().eq(Menu::getCategory, 1).orderByAsc(Menu::getSort));
+ public R<List<MenuVO>> menuList(@ApiIgnore Menu menu) {
+ List<Menu> list = menuService.list(Condition.getQueryWrapper(menu).lambda().eq(Menu::getCategory, 1).orderByAsc(Menu::getSort));
return R.data(MenuWrapper.build().listNodeVO(list));
}
@@ -138,8 +138,11 @@
*/
@GetMapping("/dynamicMenu")
@ApiOperation(value = "菜单列表", notes = "传入menu")
- public R<List<MenuVO>> dynamicMenu(String roleId, Long topMenuId, @RequestParam(value = "labelType", required = false) Integer labelType) {
- List<MenuVO> list = menuService.routes(roleId, topMenuId,labelType,1);
+ public R<List<MenuVO>> dynamicMenu(String roleId, Long topMenuId,
+ @RequestParam(value = "labelType", required = false,defaultValue = "0") Integer labelType,
+ @RequestParam(value = "roleName",required = false) String roleName,
+ @RequestParam(value = "houseCode",required = false) String houseCode) {
+ List<MenuVO> list = menuService.routes(roleId, topMenuId,labelType,1,roleName,houseCode);
return R.data(list);
}
@@ -153,7 +156,7 @@
@ApiImplicitParam(name = "code", value = "菜单编号", paramType = "query", dataType = "string"),
@ApiImplicitParam(name = "name", value = "菜单名称", paramType = "query", dataType = "string")
})
- @PreAuth(RoleConstant.HAS_ROLE_ADMINISTRATOR)
+// @PreAuth(RoleConstant.HAS_ROLE_ADMINISTRATOR)
@ApiOperationSupport(order = 5)
@ApiOperation(value = "懒加载菜单列表", notes = "传入menu")
public R<List<MenuVO>> lazyMenuList(Long parentId, @ApiIgnore @RequestParam Map<String, Object> menu) {
@@ -165,7 +168,7 @@
* 新增或修改
*/
@PostMapping("/submit")
- @PreAuth(RoleConstant.HAS_ROLE_ADMINISTRATOR)
+// @PreAuth(RoleConstant.HAS_ROLE_ADMINISTRATOR)
@ApiOperationSupport(order = 6)
@ApiOperation(value = "新增或修改", notes = "传入menu")
public R submit(@Valid @RequestBody MenuDTO menu) {
@@ -200,7 +203,7 @@
@ApiOperationSupport(order = 8)
@ApiOperation(value = "前端菜单数据", notes = "前端菜单数据")
public R<List<MenuVO>> routes(BladeUser user, Long topMenuId) {
- List<MenuVO> list = menuService.routes((user == null) ? null : user.getRoleId(), topMenuId,null,0);
+ List<MenuVO> list = menuService.routes((user == null) ? null : user.getRoleId(), topMenuId,null,0,"","");
return R.data(list);
}
--
Gitblit v1.9.3