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

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.latentdanger.business.entity.mybatis.extend.LatentDangerFlowRecordBo;
import com.yeejoin.amos.latentdanger.business.vo.DangerTimeAxisVo;
import com.yeejoin.amos.latentdanger.dao.entity.LatentDangerFlowRecord;
import org.apache.ibatis.annotations.Param;

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

public interface LatentDangerFlowRecordMapper extends BaseMapper<LatentDangerFlowRecord> {

    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);
}
