package com.xhkjedu.sapi.mapper.notice;

import com.xhkjedu.base.TkMapper;
import com.xhkjedu.sapi.model.notice.TNotice;
import com.xhkjedu.sapi.model.notice.TNoticeUser;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface NoticeUserMapper extends TkMapper<TNoticeUser> {
    /**
     * 批量添加
     * @Param [notice]
     * @Author ywx
     * @Date 2020/6/13 10:01
     * @return java.lang.Integer
     **/
    Integer batchSave(@Param("notice") TNotice notice);

    /**
     * 查看
     * @Param [noticeid, userid]
     * @Author ywx
     * @Date 2020/6/13 11:17
     * @return java.lang.Integer
     **/
    Integer reade(@Param("noticeid") Integer noticeid, @Param("userid") Integer userid
            , @Param("timestamp") int timestamp);

    //通知对象
    List<Map> listByNoticeId(@Param("nu") TNoticeUser nu);

    //删除通知对象
    void deleteByNoticeId(@Param("noticeid") Integer noticeid);

    //获取通知科目和班级
    List<TNoticeUser> listSubjectAndClass(@Param("noticeid") Integer noticeid);
}
