package com.yeejoin.amos.supervision.business.dao.mapper;

import com.yeejoin.amos.supervision.business.entity.mybatis.extend.LatentDangerFlowRecordBo;
import com.yeejoin.amos.supervision.business.vo.DangerTimeAxisVo;
import org.apache.ibatis.annotations.Param;

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

public interface LatentDangerFlowRecordMapper extends BaseMapper {

    Integer save(LatentDangerFlowRecordBo latentDangerFlowRecordBo);

    LatentDangerFlowRecordBo getByDangerIdAndActionFlag(@Param("dangerId") Long dangerId, @Param("actionFlag") String actionFlag);

    LatentDangerFlowRecordBo getByDangerIdAndCreate(@Param("dangerId") Long dangerId);

    LatentDangerFlowRecordBo getById(Long id);

    List<LatentDangerFlowRecordBo> listPassByDangerId(Long dangerId);

    Integer update(LatentDangerFlowRecordBo latentDangerFlowRecordBo);

    LatentDangerFlowRecordBo getNewestRecordByDangerId(Long dangerId);

    List<LatentDangerFlowRecordBo> listNewestRecordByDangerIds(List<Long> dangerIds);

    List<LatentDangerFlowRecordBo> listByDangerId(Long dangerId);

    void deleteByLatentDangerIds(List<Long> dangerIds);

    List<DangerTimeAxisVo> listExecuteLog(Map<String, Object> map);

    LatentDangerFlowRecordBo getByIdOderByDate(Long dangerId);
}
