package com.gree.mall.manager.commonmapper;

import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.gree.mall.manager.bean.notice.NoticeRecordReadBean;
import com.gree.mall.manager.bean.notice.NoticeRecordReadVOBean;
import com.gree.mall.manager.bean.notice.NoticeVO;
import com.gree.mall.manager.zfire.bean.ZfireParamBean;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface NoticeRecordBeanMapper {

    /**
     * 获取已读统计
     */
    @InterceptorIgnore(tenantLine = "1", blockAttack = "1", illegalSql = "1")
    List<NoticeRecordReadBean> readCount(@Param("noticeIds") List<String> noticeIds);


    @InterceptorIgnore(tenantLine = "1", blockAttack = "1", illegalSql = "1")
    IPage<NoticeRecordReadBean> list(IPage page,
                                     @Param("ex") ZfireParamBean zfireParam,
                                     @Param("adminUserId") String adminUserId,
                                     @Param("adminCompanyIds") List<String> adminCompanyIds);

    @InterceptorIgnore(tenantLine = "1", blockAttack = "1", illegalSql = "1")
    IPage<NoticeVO> listNotice(IPage page,
                               @Param("ex") ZfireParamBean zfireParam,
                               @Param("adminCompanyIds") List<String> adminCompanyIds);

    IPage<NoticeRecordReadVOBean> listRecord(IPage page,
                                             @Param("ex") ZfireParamBean zfireParam,
                                             @Param("adminUserId") String adminUserId,
                                             @Param("adminCompanyIds") List<String> adminCompanyIds);
}
