Example #1
0
 public Map<String, String> getMailById(Long id) throws SQLException, DataException {
   Connection conn = connectionManager.getConnection();
   Map<String, String> map = null;
   try {
     map = mailBoxManagerDao.getMailById(conn, id);
   } catch (SQLException e) {
     log.error(e);
     e.printStackTrace();
     throw e;
   } catch (DataException e) {
     log.error(e);
     e.printStackTrace();
     throw e;
   } finally {
     conn.close();
   }
   return map;
 }
Example #2
0
 /**
  * 删除团队介绍的数据
  *
  * @param commonIds id拼接字符串
  * @param delimiter 分割符
  * @throws DataException
  * @throws SQLException
  * @return int
  */
 public int deleteMailBox(String commonIds, String delimiter) throws DataException, SQLException {
   Connection conn = connectionManager.getConnection();
   int result = -1;
   try {
     result = mailBoxManagerDao.deleteMailBox(conn, commonIds, delimiter);
   } catch (SQLException e) {
     log.error(e);
     e.printStackTrace();
     throw e;
   } catch (DataException e) {
     log.error(e);
     e.printStackTrace();
     throw e;
   } finally {
     conn.close();
   }
   return result;
 }
Example #3
0
 public Long updateMailBoxById(Long id, String title, String content)
     throws SQLException, DataException {
   Connection conn = connectionManager.getConnection();
   Long result = -1L;
   try {
     result = mailBoxManagerDao.updateMailBoxById(conn, id, title, content);
   } catch (SQLException e) {
     log.error(e);
     e.printStackTrace();
     throw e;
   } catch (DataException e) {
     log.error(e);
     e.printStackTrace();
     throw e;
   } finally {
     conn.close();
   }
   return result;
 }