/**
   * 增加支付方式
   *
   * @param conn
   * @param name
   * @param nid
   * @param status
   * @param litpic
   * @param style
   * @param config
   * @param description
   * @param order
   * @return
   * @throws SQLException
   * @throws SQLException
   */
  public long addAccountPayment(
      String name,
      String nid,
      long status,
      String litpic,
      int style,
      String config,
      String description,
      int order)
      throws Exception {
    Connection conn = MySQL.getConnection();
    long result = -1L;
    try {
      result =
          accountPaymentDao.addAccountPayment(
              conn, name, nid, status, litpic, style, config, description, order);
      conn.commit();
    } catch (Exception e) {
      log.error(e);
      e.printStackTrace();
      conn.rollback();

      throw e;
    } finally {
      conn.close();
    }

    return result;
  }
 /**
  * 分页查询所有
  *
  * @param conn
  * @param pageBean
  * @throws DataException
  * @throws Exception
  */
 public void queryAccountPaymentPage(PageBean<Map<String, Object>> pageBean) throws Exception {
   Connection conn = MySQL.getConnection();
   try {
     accountPaymentDao.queryAccountPaymentPage(conn, pageBean);
   } catch (Exception e) {
     log.error(e);
     e.printStackTrace();
     throw e;
   } finally {
     conn.close();
   }
 }
 /**
  * 查询所有支付信息
  *
  * @return
  * @throws Exception
  * @throws DataException
  */
 public List<Map<String, Object>> queryAccountPaymentList() throws Exception {
   Connection conn = MySQL.getConnection();
   List<Map<String, Object>> mapList = new ArrayList<Map<String, Object>>();
   try {
     mapList = accountPaymentDao.queryAccountPaymentList(conn);
   } catch (Exception e) {
     log.error(e);
     e.printStackTrace();
     throw e;
   } finally {
     conn.close();
   }
   return mapList;
 }
 /**
  * 根据ID 查询
  *
  * @param conn
  * @param id
  * @return
  * @throws DataException
  * @throws Exception
  */
 public Map<String, String> queryAccountPaymentById(String nid) throws Exception {
   Connection conn = MySQL.getConnection();
   Map<String, String> map = null;
   try {
     map = accountPaymentDao.queryAccountPaymentById(conn, nid);
   } catch (Exception e) {
     log.error(e);
     e.printStackTrace();
     throw e;
   } finally {
     conn.close();
   }
   return map;
 }
  /**
   * 删除
   *
   * @param conn
   * @param id
   * @return
   * @throws Exception
   * @throws Exception
   */
  public long deleteAccountPaymentPage(long id, long status) throws Exception {
    Connection conn = MySQL.getConnection();
    long result = -1L;
    try {
      result = accountPaymentDao.deleteAccountPaymentPage(conn, id, status);
      conn.commit();
    } catch (Exception e) {
      log.error(e);
      e.printStackTrace();
      conn.rollback();

      throw e;
    } finally {
      conn.close();
    }

    return result;
  }
  /**
   * 修改
   *
   * @param conn
   * @param id
   * @param name
   * @param nid
   * @param status
   * @param litpic
   * @param style
   * @param config
   * @param description
   * @param order
   * @return
   * @throws Exception
   */
  public long updateAccountPaymentPage(
      long id, String name, String litpic, String config, String description, int order)
      throws Exception {
    Connection conn = MySQL.getConnection();
    long result = -1L;
    try {
      result =
          accountPaymentDao.updateAccountPaymentPage(
              conn, id, name, litpic, config, description, order);
      conn.commit();
    } catch (Exception e) {
      log.error(e);
      e.printStackTrace();
      conn.rollback();

      throw e;
    } finally {
      conn.close();
    }
    return result;
  }