package com.iamberry.wechat.service.mq.dao;

import java.util.List;

import com.iamberry.wechat.core.entity.mq.MQMessage;

/**
 * @author:何秀刚
 * @description: 消息队列服务器dao层
 * @createDate:2016年5月25日
 */
public interface MQDao {

	/**
	 * select wait handler message.
	 * @return
	 */
	public List<MQMessage> selectWaitHandlerMessage();

	/**
	 * batch update Message.
	 * @param messages
	 * @return
	 */
	public Integer updateBatchMessage(List<MQMessage> messages);

	/**
	 * insert one message.
	 * @param message
	 * @return
	 */
	public Integer insertOneMQMessage(MQMessage message);

	/**
	 * judge message is exits.
	 * @param message
	 * @return
	 */
	public Integer judgeMessageIsExist(MQMessage message);
	
	/**
	 * update One message
	 */
	public Integer updateMessageOne(MQMessage message);

	/**
	 * insert into one message Contain error info
	 * @param message
	 * @return
	 */
	public Integer insertOneMQMessageContainError(MQMessage message);
}
