package com.xinda.iot.mapper;

import java.util.ArrayList;
import java.util.List;
import com.xinda.iot.domain.FirmwareTaskDetail;
import com.xinda.iot.model.FirmwareTaskDetailInput;
import com.xinda.iot.model.FirmwareTaskDetailOutput;
import com.xinda.iot.model.FirmwareTaskDeviceStatistic;
import org.springframework.stereotype.Repository;

/**
 * 固件升级任务详细Mapper接口
 * 
 * @author kerwincui
 * @date 2022-10-24
 */
@Repository
public interface FirmwareTaskDetailMapper 
{
    /**
     * 查询固件升级任务详细
     * 
     * @param id 固件升级任务详细主键
     * @return 固件升级任务详细
     */
    public FirmwareTaskDetail selectFirmwareTaskDetailById(Long id);

    /**
     * 查询固件升级任务详细列表
     * 
     * @param firmwareTaskDetail 固件升级任务详细
     * @return 固件升级任务详细集合
     */
    public List<FirmwareTaskDetail> selectFirmwareTaskDetailList(FirmwareTaskDetail firmwareTaskDetail);

    /**
     * 根据固件id查询下属设备列表
     * @param firmwareTaskDetailInput
     * @return
     */
    public List<FirmwareTaskDetailOutput> selectFirmwareTaskDetailListByFirmwareId(FirmwareTaskDetailInput firmwareTaskDetailInput);

    /**
     * 查询固件升级任务详细列表-关联出固件信息
     *
     * @param firmwareTaskDetail 固件升级任务详细
     * @return 固件升级任务详细集合
     */
    public List<FirmwareTaskDetail> selectFirmwareALLDetailList(FirmwareTaskDetail firmwareTaskDetail);

    /**
     * 新增固件升级任务详细
     * 
     * @param firmwareTaskDetail 固件升级任务详细
     * @return 结果
     */
    public int insertFirmwareTaskDetail(FirmwareTaskDetail firmwareTaskDetail);

    /**
     * 修改固件升级任务详细
     * 
     * @param firmwareTaskDetail 固件升级任务详细
     * @return 结果
     */
    public int updateFirmwareTaskDetail(FirmwareTaskDetail firmwareTaskDetail);

    /**
     * 删除固件升级任务详细
     * 
     * @param id 固件升级任务详细主键
     * @return 结果
     */
    public int deleteFirmwareTaskDetailById(Long id);

    /**
     * 批量删除固件升级任务详细
     * 
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteFirmwareTaskDetailByIds(Long[] ids);

    /**
     * 批量插入任务明细
     * @param detailList
     * @return
     */
    public int  insertBatchFirmwareTaskDetail(List<FirmwareTaskDetail> detailList);

    /**
     * 固件升级设备统计
     * @param firmwareTaskDetailInput
     * @return
     */
    public List<FirmwareTaskDeviceStatistic> deviceStatistic(FirmwareTaskDetailInput firmwareTaskDetailInput);

}
