package com.ai.da.mapper.primary;

import com.ai.da.common.config.mybatis.plus.CommonMapper;
import com.ai.da.mapper.primary.entity.Notification;

import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;

public interface NotificationMapper extends CommonMapper<Notification> {

    List<Map<String, Object>> getTypeCount(Long receiverId);

    /** 解决mybatis-plus自动过滤 is_deleted为1的数据 问题 */
    Notification getUniqueLikeAndFollow(String type, Long senderId, Long receiverId, Long portfolioId);

    void updateUniqueLikeAndFollow(Long id, LocalDateTime time);

    void deleteNotification(Long id, LocalDateTime time);

    void setPersonalNotificationAllRead(String type, Long receiverId, LocalDateTime time);

    List<Long> getUnreadSysNotification(Long accountId);
}
