package cn.reghao.tnb.content.app.chat.db.mapper;

import cn.reghao.jutil.jdk.web.db.BaseMapper;
import cn.reghao.tnb.content.app.chat.model.dto.chat.ChatRecordGetRet;
import cn.reghao.tnb.content.app.chat.model.po.chat.ChatRecord;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @author reghao
 * @date 2022-04-20 14:22:31
 */
@Mapper
public interface ChatRecordMapper extends BaseMapper<ChatRecord> {
    void updateSetRevoke(long recordId);

    List<ChatRecordGetRet> findChatRecordGetRet(long receiverId, long userId, long lastRecordId, int limit);
    List<ChatRecordGetRet> findChatRecordGetRetByMsgType(int msgType, long receiverId, long userId, long lastRecordId, int limit);
    ChatRecord findByRecordId(long recordId);
}
