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); } + }