Example #1
0
  /**
   * 进入更新角色菜单的页面
   *
   * @return
   * @throws Exception
   */
  public String updaterolepage() throws Exception {
    menus = roleService.getAllMenus();
    System.out.println(trole.getRid());
    trole = roleService.getRole(trole.getRid());

    if (trole.getTmenus() != null && trole.getTmenus().size() > 0) {
      Iterator<Tmenu> iterator = trole.getTmenus().iterator();
      while (iterator.hasNext()) {
        Tmenu menus = iterator.next();
        trole.getRoles().add(menus.getMid());
      }
    }
    return "updaterolepage";
  }
Example #2
0
 /**
  * 判断角色是否存在
  *
  * @return
  * @throws Exception
  */
 public String roleIsonly() throws Exception {
   roleflag = roleService.roleIsOnly(trole.getRname(), trole.getRid());
   return "roleisonly";
 }