package cn.orionsec.ops.dao;

import cn.orionsec.ops.entity.domain.SchedulerTaskMachineRecordDO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface SchedulerTaskMachineRecordDAO extends BaseMapper<SchedulerTaskMachineRecordDO> {

    /**
     * 通过 recordId 查询状态
     *
     * @param recordId recordId
     * @return rows
     */
    List<SchedulerTaskMachineRecordDO> selectStatusByRecordId(@Param("recordId") Long recordId);

    /**
     * 通过 idList 查询状态
     *
     * @param idList idList
     * @return rows
     */
    List<SchedulerTaskMachineRecordDO> selectStatusByIdList(@Param("idList") List<Long> idList);

    /**
     * 通过 recordIdList 查询状态
     *
     * @param recordIdList recordIdList
     * @return rows
     */
    List<SchedulerTaskMachineRecordDO> selectStatusByRecordIdList(@Param("recordIdList") List<Long> recordIdList);

    /**
     * 通过 recordIdList 删除明细
     *
     * @param recordIdList recordIdList
     * @return effect
     */
    Integer deleteByRecordIdList(@Param("recordIdList") List<Long> recordIdList);

}
