/*
* Copyright (c) 京北方信息技术股份有限公司 Corporation 2022 . All rights reserved.
*
*/
package net.northking.cctp.device.db.dao;

import net.northking.cctp.device.db.entity.CdEngineInfo;
import net.northking.cctp.device.db.mapper.CdEngineInfoMapper;
import net.northking.cctp.device.dto.engineInfo.CdEngineInfoDetailDto;
import net.northking.cctp.device.dto.engineInfo.CdEngineInfoQueryDto;
import net.northking.cctp.device.dto.engineInfo.CdEngineInfoVersionDto;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.List;

/**
 * 执行引擎信息表
 *
 * <p>文件内容由代码生成器产生，请不要手动修改！ <br>
 * createdate:  2022-09-28 14:45:49  <br>
 * @author:  maven-cctp-plugin  <br>
 * @since:  1.0 <br>
 */
@Repository
public interface CdEngineInfoDao extends CdEngineInfoMapper
{

    List<CdEngineInfoDetailDto> queryPages(CdEngineInfoQueryDto dto);

    Integer updateVersion(CdEngineInfoVersionDto dto);

    List<CdEngineInfo> queryEngineInfoNotIds(@Param("num") int num, @Param("ids") List<String> ids,@Param("ipAddr")String ipAddr);

    List<CdEngineInfo> queryEngineOffLive(@Param("date") Date date);

    void updateEngineStatus(@Param("ids") List<String> ids);

    List<CdEngineInfo> queryNgInDeviceIds(@Param("pcDeviceIds") List<String> pcDeviceIds, @Param("countNeed") int countNeed);

    /**
     * 查询可用引擎
     * @param deviceIdList 设备id集合
     * @return 可用引擎集合
     */
    List<CdEngineInfo> queryUsableEngine(@Param("deviceIdList") List<String> deviceIdList);
}