package com.iamberry.wechat.service.mapper;

import java.util.List;

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

public interface MQMapper {

	/**
	 * 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);
	
	/**
	 * handler One Message
	 */
	public Integer updateMessageOne(MQMessage message);
	
	/**
	 * insert into one message Contain error info
	 * @param message
	 * @return
	 */
	public Integer insertOneMQMessageContainError(MQMessage message);
}
