package jnpf.notice.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import jnpf.model.cultivate.dto.learn.BatchCommonCountDto;
import jnpf.model.notice.domain.FtbNoticeAnnouncementsReceive;
import jnpf.model.notice.dto.FtbNoticeAnnouncementsReceiveDto;
import jnpf.model.notice.req.announcement.QueryUserListReq;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author 许贵林
 * @description 针对表【ftb_notice_announcements_receive(公告用户接收表)】的数据库操作Mapper
 * @createDate 2024-05-08 09:42:09
 * @Entity jnpf.notice.domain.FtbNoticeAnnouncementsReceive
 */
public interface FtbNoticeAnnouncementsReceiveMapper extends BaseMapper<FtbNoticeAnnouncementsReceive> {
    /**
     * 根据阅读状态查询用户列表
     * @param page
     * @param params
     * @return
     */
    Page<FtbNoticeAnnouncementsReceiveDto> queryUserListForReadStatus(@Param("page") Page<FtbNoticeAnnouncementsReceive> page,
                                                                      @Param("params") QueryUserListReq params);

    /**
     * 根据公告id查询用户数量
     * @param adList 公告id
     * @return 公告数量
     */
    List<BatchCommonCountDto> queryCountAcceptUserNum(@Param("adList") List<String> adList);

    /**
     * 批量根据公告id查询用户未提醒数量
     * @param adList 公告id
     * @return 公告数量
     */
    List<BatchCommonCountDto> batchQueryNoAlertUserNum(@Param("adList") List<String> adList);
}




