package com.tourism.webadmin.app.website.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.tourism.common.core.object.MyPageData;
import com.tourism.common.core.object.ResponseResult;
import com.tourism.webadmin.app.website.dto.DelMessageDto;
import com.tourism.webadmin.app.website.vo.GroupMessageVo;
import com.tourism.webadmin.app.website.vo.InteractionListVo;
import com.tourism.webadmin.back.model.TourImGroup;
import com.tourism.webadmin.back.model.TourImMessage;
import com.tourism.webadmin.back.vo.TourImMessageVo;

import java.util.HashMap;
import java.util.List;

public interface TourMessageService extends IService<TourImMessage> {
    /**
     * 根据群ID查询群聊消息
     * @return
     */
    HashMap<String,Object> getMessageByGroupId(Long messageId, TourImGroup group, Integer pageSize, String searchMessage);

    /**
     *
     *  删除消息
     * @param params
     * @return boolean
     */
    boolean delMessage(DelMessageDto params);

    /**
     *  撤回消息
     * @param params
     * @return boolean
     */
    boolean withdrawMessage(DelMessageDto params);

    /**
     *  设置消息已读
     * @param groupId
     * @return boolean
     */
    boolean updateRead(Long groupId);


    /**
     * 修改消息置顶
     * @param messageId
     */
    void topUpGroupMessage(Long messageId);

    /**
     * 清空聊天记录
     * @param groupId

     */
    void clearGroupMessage(Long groupId);

    MyPageData getMessageByGroupIdPage(TourImGroup group, Integer pageNum, Integer pageSize, String searchMessage,Integer messageType);


    /**
     *  编辑公告
     * @param tourImMessage
     * @return boolean
     */
    boolean updateAnnouncement(TourImMessage tourImMessage,Long userId);


    /**
     *  互动消息列表
     * @param noticeType
     * @return {@link ResponseResult }<{@link Boolean }>
     */
    MyPageData<InteractionListVo> getInteractionList(String noticeType, Long userId,Integer pageNum,Integer pageSize);

    List<GroupMessageVo> getLatestMessage(String groupId, String messageId);

}
