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

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
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 org.apache.ibatis.annotations.Param;

/**
 * 用户消息Repo
 *
 * @author harry_yao
 */
public interface UserNoticeRepository extends BaseMapper<UserNotice> {

    UserNoticeVo selectByNoticeIdAndUserId(@Param("noticeId") Long noticeId, @Param("userId") Long userId);

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

    IPage<AdminNoticeVo> pageAdmin(Page<AdminNoticeVo> page, @Param("query") AdminNoticeQuery query);
}
