package com.gyee.wisdom.alarm.sharding.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gyee.wisdom.alarm.sharding.entity.FaultHistory;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

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


@Repository
@Mapper
public interface FaultHisotryMapper extends BaseMapper<FaultHistory> {

    void batchInsert(List<FaultHistory> faultHistories);


    FaultHistory queryFaultHistoryById(@Param("historyid") Long histroyId) throws Exception;


    void faultClear(@Param("startTime") Date startTime, @Param("endTime") Date endTime) throws Exception;


    void batchConfirm(@Param("faultSnapId") Long faultSnapId,
                      @Param("confirmType") int confirmType,
                      @Param("userName") String userName,
                      @Param("alarmSnpaId") Long alarmSnpaId
    ) throws Exception;



    int updateHistoryById (FaultHistory faultHistorie) throws Exception;

}
