/* (non-Javadoc) * @see com.kedacom.chat.business.service.MessageService#add(com.kedacom.chat.business.model.Message) */ @Override public void add(Message msg) { if (StringUtils.isBlank(msg.getId())) { msg.setId(StringUtils.generateUuid()); } messageDao.addMessage(msg); }
/* (non-Javadoc) * @see com.kedacom.chat.business.service.MessageService#setMsgRead(java.lang.String, java.lang.String) */ @Override public void setMsgRead(String msgId, String userId) { messageDao.setMsgRead(msgId, userId, GlobalParam.BOOLEAN_TRUE); }
/* (non-Javadoc) * @see com.kedacom.chat.business.service.MessageService#addMsgReadStatus(java.lang.String, java.lang.String, java.lang.String) */ @Override public void addMsgReadStatus(String msgId, String userId, String readStatus) { messageDao.addMsgReadStatus(msgId, userId, readStatus); }
/* (non-Javadoc) * @see com.kedacom.chat.business.service.MessageService#deletePermanent(java.lang.String) */ @Override public void deletePermanent(String dateTime) { messageDao.removefromDB(dateTime); }
/* (non-Javadoc) * @see com.kedacom.chat.business.service.MessageService#getByFrom(java.lang.String) */ @Override public List<Message> getHistoryMsg(HistoryReq req) { return messageDao.getHistoryMsg(req); }
/* (non-Javadoc) * @see com.kedacom.chat.business.service.MessageService#get(java.lang.String) */ @Override public Message get(String id) { return messageDao.getMessage(id, StatusEnum.Enable.getStatus()); }
/* (non-Javadoc) * @see com.kedacom.chat.business.service.MessageService#delete(java.lang.String) */ @Override public void remove(String id) { messageDao.deleteHistoryMsg(id, StatusEnum.Disable.getStatus()); }