Пример #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";
  }
Пример #2
0
 /**
  * 更新角色
  *
  * @return
  * @throws Exception
  */
 public String update() throws Exception {
   roleService.updateRole(trole);
   return success("更新成功", true, "oa2");
 }
Пример #3
0
  /**
   * 新建角色
   *
   * @return
   * @throws Exception
   */
  public String newRole() throws Exception {

    roleService.newRole(trole);
    return success("添加成功", true, "oa2");
  }
Пример #4
0
 /**
  * 进入新建角色页面
  *
  * @return
  * @throws Exception
  */
 public String intoAddPage() throws Exception {
   menus = roleService.getAllMenus();
   return "toaddpage";
 }
Пример #5
0
 /**
  * 角色列表
  *
  * @return
  * @throws Exception
  */
 public String rolelist() throws Exception {
   pageModel = roleService.getRoles(this.currentPage, this.pageSize, trole);
   return "rolelist";
 }
Пример #6
0
 /**
  * 判断角色是否存在
  *
  * @return
  * @throws Exception
  */
 public String roleIsonly() throws Exception {
   roleflag = roleService.roleIsOnly(trole.getRname(), trole.getRid());
   return "roleisonly";
 }
Пример #7
0
 /**
  * 删除角色
  *
  * @return
  * @throws Exception
  */
 public String deleterole() throws Exception {
   String message = roleService.deleteRole(trole);
   return success(message, false, "oa2");
 }