新版仿ok交易所-后端
1
zj
19 hours ago 640ccb9229224642515527daf87f308a7aa9bdf4
trading-order-sys/src/main/java/com/yami/trading/sys/controller/SysMenuController.java
@@ -83,7 +83,7 @@
         List<SysMenu> menuList = sysMenuService.listMenuByUserId(userId);
         return ResponseEntity.ok(MapUtil.builder().put("menuList", menuList).put("authorities", SecurityUtils.getSysUser().getAuthorities()).build());
      }catch (Exception e){
         throw new YamiShopBindException("系统错误!");
         throw new YamiShopBindException("System error!");
      }
   }
@@ -200,11 +200,11 @@
      if(menu.getType() == MenuType.MENU.getValue()){
         if(StrUtil.isBlank(menu.getUrl())){
            throw new YamiShopBindException("菜单URL不能为空");
            throw new YamiShopBindException("Menu URL cannot be empty");
         }
      }
      if(Objects.equals(menu.getMenuId(), menu.getParentId())){
         throw new YamiShopBindException("自己不能是自己的上级");
         throw new YamiShopBindException("Cannot set yourself as parent");
      }
      //上级菜单类型
@@ -218,7 +218,7 @@
      if(menu.getType() == MenuType.CATALOG.getValue() ||
            menu.getType() == MenuType.MENU.getValue()){
         if(parentType != MenuType.CATALOG.getValue()){
            throw new YamiShopBindException("上级菜单只能为目录类型");
            throw new YamiShopBindException("Parent menu must be a directory");
         }
         return ;
      }
@@ -226,7 +226,7 @@
      //按钮
      if(menu.getType() == MenuType.BUTTON.getValue()){
         if(parentType != MenuType.MENU.getValue()){
            throw new YamiShopBindException("上级菜单只能为菜单类型");
            throw new YamiShopBindException("Parent menu must be a menu type");
         }
      }
   }