package com.hai.service;

import com.alibaba.fastjson.JSONObject;
import com.hai.entity.BsMsg;
import com.hai.entity.BsMsgUser;
import com.hai.entity.HighUser;

import java.util.List;
import java.util.Map;

/**
 * @serviceName BsMsgService.java
 * @author Sum1Dream
 * @version 1.0.0
 * @Description // 站内信接口
 * @createTime 14:27 2022/9/20
 **/
public interface BsMsgService {

    /**
     * @Author Sum1Dream
     * @Name insertMsg
     * @Description // 新增站内信
     * @Date 14:30 2022/9/20
     * @Param [bsMsg]
     * @Return void
     */
    void insertMsg(BsMsg bsMsg , HighUser user);

    /**
     * @Author Sum1Dream
     * @Name updateMsg
     * @Description //修改站内信
     * @Date 14:30 2022/9/20
     * @Param [bsMsg]
     * @Return void
     */
    void updateMsg(BsMsg bsMsg);

    /**
     * @Author Sum1Dream
     * @Name findMsg
     * @Description // 根据id查询站内信
     * @Date 14:33 2022/9/20
     * @Param [id]
     * @Return com.hai.entity.BsMsg
     */
    BsMsg findMsg(Long id);

    /**
     * @Author Sum1Dream
     * @Name getMsgByList
     * @Description // 查询站内信列表
     * @Date 14:34 2022/9/20
     * @Param [map]
     * @Return java.util.List<com.hai.entity.BsMsg>
     */
    List<BsMsg> getMsgByList(Map<String , Object> map);

    /**
     * @Author Sum1Dream
     * @Name checkMsg
     * @Description // 查看信息
     * @Date 13:52 2022/10/13
     * @Param [userId, msgId]
     * @Return void
     */
    void checkMsg(HighUser user, Long msgId);

    /**
     * @Author Sum1Dream
     * @Name findMsgUserById
     * @Description // 查询用户是否为查看内容
     * @Date 13:55 2022/10/13
     * @Param [userId, msgId]
     * @Return com.hai.entity.BsMsgUser
     */
    List<BsMsgUser> findMsgUserById(Long userId , Long msgId);

    /**
     * @Author Sum1Dream
     * @Name queryMsgByList
     * @Description // 查询站内信
     * @Date 16:29 2022/10/17
     * @Param [map]
     * @Return java.util.List<com.hai.entity.BsMsg>
     */
    List<BsMsg> queryMsgByList(Map<String , Object> map);

    /**
     * @Author Sum1Dream
     * @Name pushUserMsg
     * @Description // 推送用户信息
     * @Date 18:21 2022/11/1
     * @Param [orderId, userId]
     * @Return void
     */
    void pushUserMsg(Long orderId , String title , Integer type) throws Exception;


}
