From 7a6bdf87a5e35041bdbc622dc1d63a3dcb015c55 Mon Sep 17 00:00:00 2001 From: smallchill Date: Sat, 8 Aug 2020 15:15:15 +0800 Subject: [PATCH] =?UTF-8?q?:zap:=20=E4=BC=98=E5=8C=96=E9=A1=B6=E9=83=A8?= =?UTF-8?q?=E8=8F=9C=E5=8D=95=E9=85=8D=E7=BD=AE=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/org/springblade/system/vo/GrantVO.java | 3 +++ .../springblade/system/controller/TopMenuController.java | 7 ++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/blade-service-api/blade-system-api/src/main/java/org/springblade/system/vo/GrantVO.java b/blade-service-api/blade-system-api/src/main/java/org/springblade/system/vo/GrantVO.java index bfb6e170..4627b2df 100644 --- a/blade-service-api/blade-system-api/src/main/java/org/springblade/system/vo/GrantVO.java +++ b/blade-service-api/blade-system-api/src/main/java/org/springblade/system/vo/GrantVO.java @@ -37,6 +37,9 @@ public class GrantVO implements Serializable { @ApiModelProperty(value = "menuIds集合") private List menuIds; + @ApiModelProperty(value = "topMenuIds集合") + private List topMenuIds; + @ApiModelProperty(value = "dataScopeIds集合") private List dataScopeIds; diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/controller/TopMenuController.java b/blade-service/blade-system/src/main/java/org/springblade/system/controller/TopMenuController.java index 0cf752e9..2b2541d9 100644 --- a/blade-service/blade-system/src/main/java/org/springblade/system/controller/TopMenuController.java +++ b/blade-service/blade-system/src/main/java/org/springblade/system/controller/TopMenuController.java @@ -33,6 +33,7 @@ import org.springblade.core.tool.constant.RoleConstant; import org.springblade.core.tool.utils.Func; import org.springblade.system.entity.TopMenu; import org.springblade.system.service.ITopMenuService; +import org.springblade.system.vo.GrantVO; import org.springframework.web.bind.annotation.*; import javax.validation.Valid; @@ -124,14 +125,14 @@ public class TopMenuController extends BladeController { @PostMapping("/grant") @ApiOperationSupport(order = 8) @ApiOperation(value = "顶部菜单配置", notes = "传入topMenuId集合以及menuId集合") - public R grant(@ApiParam(value = "topMenuId集合", required = true) @RequestParam String topMenuIds, - @ApiParam(value = "menuId集合", required = true) @RequestParam String menuIds) { + public R grant(@RequestBody GrantVO grantVO) { CacheUtil.clear(SYS_CACHE); CacheUtil.clear(MENU_CACHE); CacheUtil.clear(MENU_CACHE, Boolean.FALSE); - boolean temp = topMenuService.grant(Func.toLongList(topMenuIds), Func.toLongList(menuIds)); + boolean temp = topMenuService.grant(grantVO.getTopMenuIds(), grantVO.getMenuIds()); return R.status(temp); } + }