2930313233343536
public void deleteMessageById(Integer id) throws MessageException { try { Message message = (Message) baseDao.findById(Message.class, id); baseDao.delete(message); } catch (Exception e) { throw new MessageException("Message删除异常"); } }
7374757677787980
// 设置信箱状态-发件箱 messageLogMe.setStatus(2); baseDao.save(messageLogMe); } catch (Exception e) { throw new MessageException("Message保存异常"); } }
8687888990919293
@Transactional public Message findMessageById(Integer id) throws MessageException { try { return (Message) baseDao.findById(Message.class, id); } catch (Exception e) { throw new MessageException("Message按ID查询异常"); } }
110111112113114115116117
} else { return null; } } catch (Exception e) { e.printStackTrace(); throw new MessageException("Message分页异常"); } }
128129130131132133134135
Object[] values = CommonDaoUtil.commonQuery(map); hql += values[0].toString(); // Object[]需要进行强制转换. return baseDao.find(hql, (Object[]) values[1]); } catch (Exception e) { throw new MessageException("查询Message全部异常"); } }