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

import com.yeejoin.amos.patrol.business.entity.mybatis.extend.LatentDangerFlowRecordBo;
import com.yeejoin.amos.patrol.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);
}
