|
@@ -81,7 +81,6 @@ public class MenuController extends BladeController {
|
|
* 详情
|
|
* 详情
|
|
*/
|
|
*/
|
|
@GetMapping("/detail")
|
|
@GetMapping("/detail")
|
|
- @PreAuth(RoleConstant.HAS_ROLE_ADMINISTRATOR)
|
|
|
|
@ApiOperationSupport(order = 1)
|
|
@ApiOperationSupport(order = 1)
|
|
@Operation(summary = "详情", description = "传入menu")
|
|
@Operation(summary = "详情", description = "传入menu")
|
|
public R<MenuVO> detail(Menu menu) {
|
|
public R<MenuVO> detail(Menu menu) {
|
|
@@ -97,7 +96,7 @@ public class MenuController extends BladeController {
|
|
@Parameter(name = "code", description = "菜单编号", in = ParameterIn.QUERY, schema = @Schema(type = "string")),
|
|
@Parameter(name = "code", description = "菜单编号", in = ParameterIn.QUERY, schema = @Schema(type = "string")),
|
|
@Parameter(name = "name", description = "菜单名称", in = ParameterIn.QUERY, schema = @Schema(type = "string"))
|
|
@Parameter(name = "name", description = "菜单名称", in = ParameterIn.QUERY, schema = @Schema(type = "string"))
|
|
})
|
|
})
|
|
- @PreAuth(RoleConstant.HAS_ROLE_ADMINISTRATOR)
|
|
|
|
|
|
+
|
|
@ApiOperationSupport(order = 2)
|
|
@ApiOperationSupport(order = 2)
|
|
@Operation(summary = "列表", description = "传入menu")
|
|
@Operation(summary = "列表", description = "传入menu")
|
|
public R<List<MenuVO>> list(@Parameter(hidden = true) @RequestParam Map<String, Object> menu) {
|
|
public R<List<MenuVO>> list(@Parameter(hidden = true) @RequestParam Map<String, Object> menu) {
|
|
@@ -113,7 +112,6 @@ public class MenuController extends BladeController {
|
|
@Parameter(name = "code", description = "菜单编号", in = ParameterIn.QUERY, schema = @Schema(type = "string")),
|
|
@Parameter(name = "code", description = "菜单编号", in = ParameterIn.QUERY, schema = @Schema(type = "string")),
|
|
@Parameter(name = "name", description = "菜单名称", in = ParameterIn.QUERY, schema = @Schema(type = "string"))
|
|
@Parameter(name = "name", description = "菜单名称", in = ParameterIn.QUERY, schema = @Schema(type = "string"))
|
|
})
|
|
})
|
|
- @PreAuth(RoleConstant.HAS_ROLE_ADMINISTRATOR)
|
|
|
|
@ApiOperationSupport(order = 3)
|
|
@ApiOperationSupport(order = 3)
|
|
@Operation(summary = "懒加载列表", description = "传入menu")
|
|
@Operation(summary = "懒加载列表", description = "传入menu")
|
|
public R<List<MenuVO>> lazyList(Long parentId, @Parameter(hidden = true) @RequestParam Map<String, Object> menu,BladeUser bladeUser) {
|
|
public R<List<MenuVO>> lazyList(Long parentId, @Parameter(hidden = true) @RequestParam Map<String, Object> menu,BladeUser bladeUser) {
|
|
@@ -130,7 +128,6 @@ public class MenuController extends BladeController {
|
|
@Parameter(name = "code", description = "菜单编号", in = ParameterIn.QUERY, schema = @Schema(type = "string")),
|
|
@Parameter(name = "code", description = "菜单编号", in = ParameterIn.QUERY, schema = @Schema(type = "string")),
|
|
@Parameter(name = "name", description = "菜单名称", in = ParameterIn.QUERY, schema = @Schema(type = "string"))
|
|
@Parameter(name = "name", description = "菜单名称", in = ParameterIn.QUERY, schema = @Schema(type = "string"))
|
|
})
|
|
})
|
|
- @PreAuth(RoleConstant.HAS_ROLE_ADMINISTRATOR)
|
|
|
|
@ApiOperationSupport(order = 4)
|
|
@ApiOperationSupport(order = 4)
|
|
@Operation(summary = "菜单列表", description = "传入menu")
|
|
@Operation(summary = "菜单列表", description = "传入menu")
|
|
public R<List<MenuVO>> menuList(@Parameter(hidden = true) @RequestParam Map<String, Object> menu) {
|
|
public R<List<MenuVO>> menuList(@Parameter(hidden = true) @RequestParam Map<String, Object> menu) {
|
|
@@ -158,7 +155,6 @@ public class MenuController extends BladeController {
|
|
* 新增或修改
|
|
* 新增或修改
|
|
*/
|
|
*/
|
|
@PostMapping("/submit")
|
|
@PostMapping("/submit")
|
|
- @PreAuth(RoleConstant.HAS_ROLE_ADMINISTRATOR)
|
|
|
|
@ApiOperationSupport(order = 6)
|
|
@ApiOperationSupport(order = 6)
|
|
@Operation(summary = "新增或修改", description = "传入menu")
|
|
@Operation(summary = "新增或修改", description = "传入menu")
|
|
public R submit(@Valid @RequestBody Menu menu,BladeUser bladeUser) {
|
|
public R submit(@Valid @RequestBody Menu menu,BladeUser bladeUser) {
|
|
@@ -182,7 +178,6 @@ public class MenuController extends BladeController {
|
|
* 删除
|
|
* 删除
|
|
*/
|
|
*/
|
|
@PostMapping("/remove")
|
|
@PostMapping("/remove")
|
|
- @PreAuth(RoleConstant.HAS_ROLE_ADMINISTRATOR)
|
|
|
|
@ApiOperationSupport(order = 7)
|
|
@ApiOperationSupport(order = 7)
|
|
@Operation(summary = "删除", description = "传入ids")
|
|
@Operation(summary = "删除", description = "传入ids")
|
|
public R remove(@Parameter(name = "主键集合", required = true) @RequestParam String ids) {
|
|
public R remove(@Parameter(name = "主键集合", required = true) @RequestParam String ids) {
|
|
@@ -198,7 +193,7 @@ public class MenuController extends BladeController {
|
|
@ApiOperationSupport(order = 8)
|
|
@ApiOperationSupport(order = 8)
|
|
@Operation(summary = "前端菜单数据", description = "前端菜单数据")
|
|
@Operation(summary = "前端菜单数据", description = "前端菜单数据")
|
|
public R<List<MenuVO>> routes(BladeUser user, Long topMenuId) {
|
|
public R<List<MenuVO>> routes(BladeUser user, Long topMenuId) {
|
|
- List<MenuVO> list = menuService.routes((user == null) ? null : user.getRoleId(), topMenuId);
|
|
|
|
|
|
+ List<MenuVO> list = menuService.routes((user == null) ? null : user.getRoleId(), topMenuId,user.getClientId());
|
|
return R.data(list);
|
|
return R.data(list);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -220,7 +215,7 @@ public class MenuController extends BladeController {
|
|
@ApiOperationSupport(order = 10)
|
|
@ApiOperationSupport(order = 10)
|
|
@Operation(summary = "前端按钮数据", description = "前端按钮数据")
|
|
@Operation(summary = "前端按钮数据", description = "前端按钮数据")
|
|
public R<List<MenuVO>> buttons(BladeUser user) {
|
|
public R<List<MenuVO>> buttons(BladeUser user) {
|
|
- List<MenuVO> list = menuService.buttons(user.getRoleId());
|
|
|
|
|
|
+ List<MenuVO> list = menuService.buttons(user.getRoleId(),user.getClientId());
|
|
return R.data(list);
|
|
return R.data(list);
|
|
}
|
|
}
|
|
|
|
|