/**
   * 根据ID返回详细信息
   *
   * @param
   * @return
   * @throws
   */
  public List treeList(IBaseDTO dto, PageInfo pi, String id) {

    List list = new ArrayList();

    LeafRightSearch lrs = new LeafRightSearch();

    Object[] result = (Object[]) dao.findEntity(lrs.treeList(dto, pi, id));
    num = dao.findEntitySize(lrs.treeList(dto, pi, id));
    for (int i = 0, size = result.length; i < size; i++) {
      SysLeafRight slr = (SysLeafRight) result[i];
      DynaBeanDTO dbd = new DynaBeanDTO();

      dbd.set("id", slr.getId());
      dbd.set("treeId", slr.getId());
      dbd.set("treeType", slr.getType());
      dbd.set("label", slr.getLabel());
      dbd.set("nickName", slr.getNickName());
      String remark = slr.getRemark() == null ? "" : slr.getRemark();
      if (remark.length() > 15) {
        remark = remark.substring(0, 15);
      }
      dbd.set("remark", remark);
      dbd.set("icon", slr.getIcon());
      list.add(dbd);
    }
    return list;
  }
  /**
   * 根据ID返回详细信息
   *
   * @param
   * @return
   * @throws
   */
  public IBaseDTO treeInfo(String id) {

    SysLeafRight slr = (SysLeafRight) dao.loadEntity(SysLeafRight.class, id);
    IBaseDTO dto = new DynaBeanDTO();

    dto.set("id", slr.getId());
    dto.set("treeId", slr.getId());
    dto.set("treeType", slr.getType());
    dto.set("label", slr.getLabel());
    dto.set("nickName", slr.getNickName());
    dto.set("remark", slr.getRemark());

    return dto;
  }