package com.sckw.slope.detection.dao.mysql;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sckw.slope.detection.model.dos.mysql.KwsDeviceIntegration;
import com.sckw.slope.detection.model.dto.DeviceElementDTO;
import com.sckw.slope.detection.model.vo.DeviceIntegrationVo;
import com.sckw.slope.detection.model.vo.DeviceVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
@DS("mysql")
public interface KwsDeviceIntegrationMapper extends BaseMapper<KwsDeviceIntegration> {
    int deleteByPrimaryKey(Long id);

    int insert(KwsDeviceIntegration record);

    int insertSelective(KwsDeviceIntegration record);

    KwsDeviceIntegration selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(KwsDeviceIntegration record);

    int updateByPrimaryKey(KwsDeviceIntegration record);

    List<DeviceElementDTO> selectIntegratedElement(@Param("projectId") String projectId,
                                                   @Param("mountainId") String mountainId,
                                                   @Param("status") List<Integer> status,
                                                   @Param("deviceId") Long deviceId
                                                   );

    List<KwsDeviceIntegration> selectListByParms(@Param("vo") DeviceVo vo);

    List<DeviceIntegrationVo> selectListByParamsAndInterName(@Param("vo") DeviceVo vo);

    List<DeviceIntegrationVo> selectListParamsAndInterNameByDeviceId(@Param("id") Long id);
}