Esempio n. 1
0
  private MessageSend loadMessageSend(Integer id) throws LogicException {
    MessageSend send = messageSendDao.selectById(id);
    if (send == null) {
      throw new LogicException("error.message.notFound");
    }

    return send;
  }
Esempio n. 2
0
  @Override
  @Transactional(readOnly = true)
  public Page<MessageReceive> findMessageReceives(MessageReceivePageParam param) {

    if (param.getSend() != null) {
      MessageSend send = messageSendDao.selectById(param.getSend().getId());
      if (send == null) {
        return new Page<MessageReceive>(param, 0, new ArrayList<MessageReceive>());
      }

      super.doAuthencation(UserContext.getUser(), send.getSender());
    }

    int total = messageReceiveDao.selectCount(param);
    List<MessageReceive> datas = messageReceiveDao.selectPage(param);
    return new Page<MessageReceive>(param, total, datas);
  }