package com.ho.business.mapper;

import com.ho.business.entity.MessageInfoVo;
import com.ho.business.entity.MessageReceiverVo;
import org.apache.ibatis.annotations.Param;
import org.mapstruct.Mapper;

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

@Mapper
public interface MessageInfoMapper {

    void addMessageInfo(@Param("messageDetail") MessageInfoVo messageDetail);

    void  addMessageReceiver(@Param("messageReceiver") List<MessageReceiverVo> messageReceivers);

    void deleteMessageInfo (@Param("messageIds") List<String> messageIds);

    void deleteMessageReceivers (@Param("messageIds") List<String> messageIds);

    List<MessageInfoVo> selectMessageInfo(@Param("condition") Map<String,Object> condition);

    List<MessageReceiverVo> selectMessageReceivers (@Param("condition") Map<String,Object> condition);

    void updateMessageReadStatus( @Param("condition") Map<String,Object> condition);

    void updateCreateStatus(@Param("messageId") List<String> messageId);

    void updateReceivingTime(@Param("messageId") List<String> messageId);

    void refreshMessageReadStatus(@Param("message") MessageInfoVo message);



}
