package cn.qinys.platform.mobile.mapper;

import cn.qinys.platform.entity.wishing.ChatMessage;
import cn.qinys.platform.mobile.resp.ChatHistoryResp;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface ChatMessageMapper extends BaseMapper<ChatMessage> {
    @Select("SELECT * FROM chat_message ${ew.customSqlSegment}")
    Page<ChatHistoryResp> getChatHistoryPage(Page<ChatMessage> page, @Param(Constants.WRAPPER) Wrapper<ChatMessage> wrapper);

}
