package com.jpsoft.shinestar.modules.base.dao;

import java.util.List;

import com.github.pagehelper.Page;
import com.jpsoft.shinestar.modules.base.entity.MessageInfo;
import org.springframework.stereotype.Repository;
import com.jpsoft.shinestar.modules.base.entity.MessageReceiver;
import java.util.Map;
import com.jpsoft.shinestar.modules.common.dto.Sort;

@Repository
public interface MessageReceiverDAO {
	int insert(MessageReceiver entity);
	int update(MessageReceiver entity);
	int exist(String id);
	MessageReceiver get(String id);
	int delete(String id);
	List<MessageReceiver> list();
	List<MessageReceiver> search(Map<String,Object> searchParams,List<Sort> sortList);
	int countUnReadByPersonIdAndType(Long personId, String type);
	List<MessageReceiver> messagePageSearch(Map<String, Object> searchParams,  List<Sort> sortList);
	MessageReceiver findByMessageIdAndPersonId(String messageId, Long personId);
}