package com.gx.obe.server.management.im.service;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.IService;
import com.gx.obe.server.management.im.entity.Message;
 
/** 
 * @Description: 
 * @author mazc 
 */
public interface MessageService extends IService<Message> {

 	/**
	 * @Description: 批量更新
	 * @author mazc
	 * @param MessageList 
	 */
 	Integer updateByBatch(List<Message> MessageList);
	
	/**
	 * @Description: 批量插入
	 * @author mazc
	 * @param MessageList 
	 */
	Integer insertByBatch(List<Message> MessageList);
	
	/**
     * @Description: 指定字段修改
     * @author chenxw
     * @param Message
	 * @param attributes
     */
    boolean updateAssignProperty(Message Message, String[] attributes);
    
    /**
     * @Description: 批量指定字段修改
     * @author chenxw
     * @param MessageList
	 * @param attributes
     */
    Integer batchUpdateProperty(List<Message> MessageList, String[] attributes);
	
	/** 
	 * @Description: 批量添加或跟新
	 * @author chenxw
	 * @param MessageList
	 * @param attributes
	 * @return 
	 */
    Integer batchSaveOrUpdate(List<Message> MessageList, String[] attributes);
	
    List<Message> getMessageByReceiveIdAndSendId(String myId, String receiveId);
    
    List<Message> getMessageByReceiveIdlist(String id);
    
    
    List<Message> getMessageByGroupIdAndSendTimeAsc(String groupId);
    
    List<Message> getMessageListByReceiveIdAndSendIdAndSendTiemAsc(String myId, String uid); 
    
    
    boolean saveUpdate(Message message);
}