package com.qmth.themis.business.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.qmth.themis.business.dao.TIeInvigilateWarnInfoMapper;
import com.qmth.themis.business.dto.response.TIeWarningNotifyDto;
import com.qmth.themis.business.entity.TIeInvigilateWarnInfo;
import com.qmth.themis.business.service.TIeInvigilateWarnInfoService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Description: 监考预警信息 服务实现类
 * @Param:
 * @return:
 * @Author: wangliang
 * @Date: 2020/6/25
 */
@Service
public class TIeInvigilateWarnInfoServiceImpl extends ServiceImpl<TIeInvigilateWarnInfoMapper, TIeInvigilateWarnInfo> implements TIeInvigilateWarnInfoService {

    @Resource
    TIeInvigilateWarnInfoMapper tIeInvigilateWarnInfoMapper;

    /**
     * 预警提醒
     *
     * @param examId
     * @param examActivityId
     * @param roomCode
     * @param userId
     * @return
     */
    @Override
    public Integer warningCount(Long examId, Long examActivityId, String roomCode, Long userId) {
        return tIeInvigilateWarnInfoMapper.warningCount(examId, examActivityId, roomCode, userId);
    }

    /**
     * 预警通知
     *
     * @param examId
     * @param userId
     * @param orgId
     * @return
     */
    @Override
    public List<TIeWarningNotifyDto> warningMessage(Long examId, Long userId, Long orgId) {
        return tIeInvigilateWarnInfoMapper.warningMessage(examId, userId, orgId);
    }
}
