linwe
2024-08-09 8b7258c9427882bb1798f1502eaa35184c6e374e
src/main/java/org/springblade/modules/system/controller/MenuController.java
@@ -128,8 +128,8 @@
//   @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,defaultValue = "0") Integer labelType, @RequestParam(value = "roleName",required = false) String roleName) {
      List<MenuVO> list = menuService.routes(roleId, topMenuId,labelType,1,roleName);
   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);
   }
@@ -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);
   }