package com.casic.missiles.modular.system.dao;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.casic.missiles.modular.system.model.AlarmRecords;
import com.casic.missiles.core.datascope.DataScope;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author casic123
 * @since 2019-05-17
 */
public interface AlarmRecordsMapper extends BaseMapper<AlarmRecords> {

    List<AlarmRecords> alarmList(@Param("page") Page<AlarmRecords> page, @Param("keywords") String keywords, @Param("beginTime") String beginTime, @Param("endTime") String endTime, @Param("status") String status, @Param("alarmType") String alarmType, @Param("alarmContent") String alarmContent, @Param("dataScope") DataScope dataScope);

    List<AlarmRecords> alarmListAll(@Param("page") Page<AlarmRecords> page, @Param("keywords") String keywords, @Param("beginTime") String beginTime, @Param("endTime") String endTime, @Param("status") String status, @Param("alarmType") String alarmType, @Param("alarmContent") String alarmContent, @Param("dataScope") DataScope dataScope);

    @Update("update sys_user set attr1=#{pushOpen} where id = #{id}")
    void pushOpen(@Param("id") Long id,@Param("pushOpen") String pushOpen);
}
