package com.zcxk.rmcp.core.dao;

import com.zcxk.core.common.pojo.UserCondition;
import com.zcxk.rmcp.api.dto.install.InstallDeviceDto;
import com.zcxk.rmcp.api.dto.install.InstallListDto;
import com.zcxk.rmcp.api.dto.install.InstallQueryDto;
import com.zcxk.rmcp.api.vo.InstallListVo;
import com.zcxk.rmcp.core.entity.InstallList;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author linqingwei
 * @date 2021-07-21 9:44
 */
@Mapper
public interface InstallListMapper {
    int insertSelective(InstallList record);

    int updateByPrimaryKeySelective(InstallList record);

    int batchInsert(@Param("list") List<InstallList> list);

    List<InstallListDto> getList(@Param("planId") Integer planId);

    List<InstallDeviceDto> getInstallList(@Param("dto") InstallQueryDto dto, @Param("userCondition") UserCondition userCondition);

    List<InstallListVo> getUnInstallList(@Param("planId") Integer planId);

    List<InstallDeviceDto> getUnInstallDeviceList(@Param("planId") Integer planId);

    InstallList findById(@Param("id") Integer id);

    int accept(@Param("ids") List<Integer> ids);

    int delete(@Param("ids") List<Integer> ids);

    int deleteByDeviceId(@Param("ids") List<Long> ids);
}