package com.zsc.edu.gateway.modules.message.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.zsc.edu.gateway.framework.security.UserDetailsImpl;
import com.zsc.edu.gateway.modules.message.dto.UserNoticeDto;
import com.zsc.edu.gateway.modules.message.entity.UserNotice;
import com.zsc.edu.gateway.modules.message.query.AdminNoticeQuery;
import com.zsc.edu.gateway.modules.message.query.UserNoticeQuery;
import com.zsc.edu.gateway.modules.message.vo.AdminNoticeVo;
import com.zsc.edu.gateway.modules.message.vo.UserNoticeVo;

import java.util.List;

/**
 * 用户消息Service
 *
 * @author harry_yao
 */
public interface UserNoticeService extends IService<UserNotice> {

    Boolean createByAdmin(UserNoticeDto dto);

    UserNoticeVo detail(Long noticeId, Long userId);

    IPage<UserNoticeVo> page(Page<UserNoticeVo> page, UserNoticeQuery query);

    Integer countUnread(UserDetailsImpl userDetails);

    boolean markAsRead(UserDetailsImpl userDetails, List<Long> noticeIds);


    boolean markAllAsRead(UserDetailsImpl userDetails);

    IPage<AdminNoticeVo> getAdminNoticePage(Page<AdminNoticeVo> page, AdminNoticeQuery query);
}
