package org.dromara.main.service;

import org.dromara.common.mybatis.core.page.PageQuery;
import org.dromara.common.mybatis.core.page.TableDataInfo;
import org.dromara.main.domain.bo.CsMessageBo;
import org.dromara.main.domain.vo.CsMessageVo;
import org.springframework.web.multipart.MultipartFile;

public interface ICsMessageService {

    /**
     * 查询历史消息
     */
    TableDataInfo<CsMessageVo> queryHistoryMessages(Long sessionId, Long beforeMsgId, PageQuery pageQuery);

    /**
     * 发送文本消息
     */
    CsMessageVo sendTextMessage(CsMessageBo bo);

    /**
     * 发送图片消息
     */
    CsMessageVo sendImageMessage(Long sessionId, String msgNo, Long senderId, MultipartFile file);

    /**
     * 发送文件消息
     */
    CsMessageVo sendFileMessage(Long sessionId, String msgNo, Long senderId, MultipartFile file);

    /**
     * 发送岗位卡片
     */
    CsMessageVo sendJobCard(CsMessageBo bo);

    /**
     * 标记消息已读
     */
    Boolean markAsRead(Long sessionId, Long lastReadMsgId);

    /**
     * 撤回消息
     */
    Boolean recallMessage(Long msgId);
}
