code: public String activate() {
      Integer[] menuIds = getIds(getShortName(), Integer.class);
      Boolean enabled = getBoolean("isActivate");
      if (null == enabled) enabled = Boolean.TRUE;
  
      Set<Menu> updated = CollectUtils.newHashSet();
      List<Menu> menus = entityDao.get(Menu.class, menuIds);
      for (Menu menu : menus) {
        if (enabled) {
          updated.addAll(HierarchyEntityUtils.getPath(menu));
        } else {
          updated.addAll(HierarchyEntityUtils.getFamily(menu));
        }
      }
      for (Menu menu : updated)
        ((MenuBean) menu).setEnabled(enabled);
      entityDao.saveOrUpdate(updated);
  
      return redirect("search", "info.save.success");
    }
docs: 禁用或激活一个或多个模块