/**
   * 树节点的增加
   *
   * @param IBaseDTO dto 是BaseTree 和 ViewTreeDict的信息
   * @return
   * @throws
   */
  public void addDict(IBaseDTO dto, String treeId) {

    SysLeafRight slr = new SysLeafRight();

    BaseTree bt = (BaseTree) dao.loadEntity(BaseTree.class, treeId);

    slr.setId(ks.getNext("sys_leaf_right"));
    slr.setBaseTree(bt);
    slr.setType(dto.get("treeType").toString());
    slr.setLabel(dto.get("label").toString());
    slr.setNickName(dto.get("nickName").toString());
    slr.setRemark(dto.get("remark").toString());
    slr.setIcon(dto.get("icon").toString());
    slr.setDeleteMark(dto.get("deleteMark").toString());
    slr.setIcon((String) dto.get("icon"));
    dao.saveEntity(slr);
  }
  /**
   * 树节点的修改
   *
   * @param IBaseDTO dto 是BaseTree 和 ViewTreeDict的信息
   * @return
   * @throws
   */
  public boolean updateDict(IBaseDTO dto) {
    SysLeafRight slr = (SysLeafRight) dao.loadEntity(SysLeafRight.class, dto.get("id").toString());

    slr.setLabel(dto.get("label").toString());
    slr.setNickName(dto.get("nickName").toString());
    slr.setRemark(dto.get("remark").toString());
    slr.setDeleteMark(dto.get("deleteMark").toString());
    slr.setIcon(dto.get("icon").toString());
    slr.setType(dto.get("treeType").toString());

    dao.updateEntity(slr);

    return true;
  }