package com.ym.im.mapper;

import com.ym.im.entity.ChatRecord;
import com.ym.im.entity.PullChatRecord;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 聊天记录 Mapper 接口
 * </p>
 *
 * @author 陈俊雄
 * @since 2019-05-28
 */
public interface ChatRecordMapper {
    int insert(@Param("chat") ChatRecord chatRecord, @Param("index") int index);

    int insertSelective(@Param("chat") ChatRecord chatRecord, @Param("index") int index);

    int updateById(@Param("chat") ChatRecord chatRecord, @Param("index") int index);

    int updateByIdSelective(@Param("chat") ChatRecord chatRecord, @Param("index") int index);

    int updateBatchReceiveTimeById(@Param("chats") List<ChatRecord> chats, @Param("index") int index);

    int updateReceiveTime(@Param("chat") ChatRecord chatRecord, @Param("index") int index);

    ChatRecord selectById(@Param("id") Long id, @Param("index") int index);

    List<ChatRecord> getChatRecord(@Param("pull") PullChatRecord pull, @Param("index") int index);
}
