package com.xjrsoft.module.system.mapper;

import com.github.yulichang.base.MPJBaseMapper;
import com.xjrsoft.module.system.entity.SystemUpdateMessageNotice;
import com.xjrsoft.module.system.vo.SystemUpdateMessagePageTempVo;
import com.xjrsoft.module.system.vo.SystemUpdateMessagePageVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
* @title: 系统消息通知表
* @Author brealinxx
* @Date: 2024-04-17
* @Version 1.0
*/
@Mapper
public interface SystemUpdateMessageNoticeMapper extends MPJBaseMapper<SystemUpdateMessageNotice> {

    List<SystemUpdateMessagePageTempVo> GetTeacherUserID();

    List<SystemUpdateMessagePageTempVo> GetStudentUserID();

    @Update("UPDATE system_update_message_notice SET STATUS = 1 WHERE system_update_message_id = #{messageId} AND user_id = #{userId}")
    Boolean updateStatus(Long messageId, Long userId);
}
