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.KwsDeviceModelPart;
import com.sckw.slope.detection.model.dto.DeviceElementDTO;
import com.sckw.slope.detection.model.vo.DevicePartModelVo;
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 KwsDeviceModelPartMapper extends BaseMapper<KwsDeviceModelPart> {
    int deleteByPrimaryKey(Long id);

    int insert(KwsDeviceModelPart record);

    int insertSelective(KwsDeviceModelPart record);

    KwsDeviceModelPart selectByPrimaryKey(Long id);

    List<DevicePartModelVo> selectByModelId(Long deviceModelId);



    int updateByPrimaryKeySelective(KwsDeviceModelPart record);

    int updateByPrimaryKey(KwsDeviceModelPart record);

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

    /**
     * 查询项目下所有的设备
     * @param projectId
     * @param mountainId
     * @param status
     * @return
     */
    List<DeviceElementDTO> selectElementAllList(@Param("projectId") String projectId, @Param("mountainId") String mountainId, @Param("status") List<Integer> status);
}