package com.codvision.base.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.codvision.base.entity.SysNoticeUserMapper;
import com.codvision.base.entity.vo.SysNoticeVO;
import org.apache.ibatis.annotations.Param;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author lingee
 * @since 2023-12-01
 */
public interface SysNoticeUserMapperMapper extends BaseMapper<SysNoticeUserMapper> {

    /**
     * 添加通知发送记录
     *
     * @param id  通知id
     * @param uid 用户id
     */
    void addNoticeUserMapper(@Param("id") Integer id, @Param("uid") Integer uid);

    /**
     * 查询通知详情
     *
     * @param id 通知id
     * @return 通知详情
     */
    SysNoticeVO getDetail(@Param("id") Integer id);

    /**
     * 全部标记为已读
     *
     * @param uid  用户id
     * @param type 类型
     */
    void markAllRead(@Param("uid") Integer uid, @Param("type") Integer type);
}
