Ejemplo n.º 1
0
  /**
   * 菜单编辑页面
   *
   * @param model
   * @param id
   * @return
   */
  @RequestMapping("/{id}/toMenuEdit")
  public String toMenuEdit(Model model, @PathVariable String id) {
    SysMenu menu = sysMenuService.findOne(id);
    List<Map<String, Object>> permissions = sysMenuService.getMenuPermissions();
    List<Map<String, Object>> parents = sysMenuService.getMenuParents();

    model.addAttribute("menu", menu);
    model.addAttribute("permissions", permissions);
    model.addAttribute("parents", parents);
    return "sys/sys_menu_edit";
  }
Ejemplo n.º 2
0
  /**
   * 增加菜单页面
   *
   * @param model
   * @return
   */
  @RequestMapping("/toAddMenu")
  public String toAddMenu(Model model) {

    List<Map<String, Object>> permissions = sysMenuService.getMenuPermissions();
    List<Map<String, Object>> parents = sysMenuService.getMenuParents();

    model.addAttribute("permissions", permissions);

    model.addAttribute("parents", parents);

    return "sys/sys_menu_add";
  }